User Tools

Site Tools


pracro:praxisd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pracro:praxisd [2011/10/11 14:33] devapracro:praxisd [2011/12/08 10:18] (current) – created deva
Line 1: Line 1:
-======Praxisd====== +This page has been moved to http://wiki.oftal.dk/doku.php?id=praxisd:praxisd
-Pracro must connect to praxisd in order to: +
-  * Upload journal data. +
-  * Retrieve journal data. +
-  * Get cave list. +
-  * Post cave information to a patient. +
-  * Get cave information from a patient. +
- +
-Future uses include: +
-  * Calendar extracts for macro prefills. +
- +
-=====libpraxisd===== +
-The praxisd interface library. +
-Using curl. +
-interface: +
-<code c> +
-struct { +
-  char *data; +
-  size_t size; +
-} journal_t; +
- +
-journal_t *getJournal(const char *patientid); +
-void freeJournal(journal_t *journal); +
- +
- +
-</code> +
- +
-======API====== +
-=====GET===== +
-====Get Journal By CPR==== +
-<code>/praxisd/1.0/journal/get_by_cpr</code> +
-Parameters: +
-  * cpr the cpr number of the patient +
-//Returns// the journal plaintext in utf-8 +
- +
-====Get Patient By CPR==== +
-<code>/praxisd/1.0/patient/get_by_cpr</code> +
-Parameters: +
-  * cpr the cpr number of the patient +
-//Returns// xml structure with patient data.\\ +
-XML fields: +
- +
-Example: ''curl localhost:10000/praxisd/1.0/patient/get_by_cpr?cpr=nnnnnnnnnn'' +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <patient cpr="nnnnnnnnnn"> +
-    <efternavn>XXXXXXXXXX</efternavn> +
-    <fornavne>XXXXXXXXXX</fornavne> +
-    <stilling></stilling> +
-    <gade></gade> +
-    <by>0</by> +
-    <telefonnumre></telefonnumre> +
-    <sikringsgr>9</sikringsgr> +
-    <amtsnr>070</amtsnr> +
-    <sygekontor>KNr. 0</sygekontor> +
-    <henvnr></henvnr> +
-    <frilinie1>0000097217</frilinie1> +
-    <frilinie2></frilinie2> +
-    <frilinie3></frilinie3> +
-    <frilinie4></frilinie4> +
-    <frilinie5></frilinie5> +
-    <sogeords> +
-      <sogeord sogenr="T:0028" sogedato="261109">      </sogeord> +
-      <sogeord sogenr="T:0029" sogedato="261109">      </sogeord> +
-      <sogeord sogenr="BL0014" sogedato="010710"> o.dxt</sogeord> +
-      <sogeord sogenr="BCGB00" sogedato="010710"> o.sin</sogeord> +
-      <sogeord sogenr="BCGB00" sogedato="010710"> o.dxt</sogeord> +
-      <sogeord sogenr="BL0001" sogedato="010710">      </sogeord> +
-      <sogeord sogenr="BL0001" sogedato="010710"> o.dxt</sogeord> +
-      <sogeord sogenr="BL0021" sogedato="061210"> o.u  </sogeord> +
-    </sogeords> +
-    <ydernr>          </ydernr> +
-    <created>201000</created> +
-    <donottouch>                    </donottouch> +
-    <visus> </visus> +
-    <labkort> </labkort> +
-    <medkort>*</medkort> +
-    <jlock> </jlock> +
-    <unknown1>130509</unknown1> +
-    <henvdato>      </henvdato> +
-    <aarhund>19</aarhund> +
-    <fakturadato>      </fakturadato> +
-    <fakturabelob>           </fakturabelob> +
-    <betaldato>      </betaldato> +
-    <betalbelob>           </betalbelob> +
-    <jdato>230311</jdato> +
-    <unknown250> </unknown250> +
-    <unknown251> </unknown251> +
-    <jtime>    </jtime> +
-  </patient> +
-</praxisd> +
-</code> +
- +
- +
- +
- +
-====Get Diverse From Sogenr==== +
-<code>/praxisd/1.0/diverse/get_all_by_sogenr</code> +
-Get list of matching sogenr entries. +
-Parameters: +
-  * sogenr the sogenr prefix to match in the search. +
-//Returns// xml structure with matching diverse entries\\ +
-Prefix 'A' adresse: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_adresse sogenr="Annnn"> +
-    <edi_adresse></edi_adresse> +
-    <navn>XXXXXX</navn> +
-    <att></att> +
-    <gade>XXXXXXX</gade> +
-    <by>XXXXXXXXX</by> +
-    <tlf>nnnnnnnn</tlf> +
-    <fax>nnnnnnnn</fax> +
-  </div_adresse> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'B' behandling: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_behandling sogenr="Bnnnnn"> +
-    <kode>XXXXX</kode> +
-    <behandling>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</behandling> +
-    <bemaerkning></bemaerkning> +
-    <udregning></udregning> +
-  </div_behandling> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'C' cave: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_cave sogenr="Cnnnnn"> +
-    <cave>AZOPT</cave> +
-    <bemaerkning1></bemaerkning1> +
-    <bemaerkning2></bemaerkning2> +
-    <bemaerkning3></bemaerkning3> +
-  </div_cave> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'D' diagnose: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_diagnose sogenr="Dnnnnn"> +
-    <kode>H</kode> +
-    <diagnose>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</diagnose> +
-    <bemaerkning></bemaerkning> +
-  </div_diagnose> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'E' ?????? FIXME +
- +
-Prefix 'F' frase: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_frase sogenr="Fnnnnn"> +
-    <frase1>Shaffer</frase1> +
-    <frase2></frase2> +
-    <frase3></frase3> +
-    <frase4></frase4> +
-  </div_frase> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'G' grafik: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_grafik sogenr="Gnnnnn"> +
-    <navn>ENO s1</navn> +
-    <bemaerkning>Har du set strudsen ENO ?</bemaerkning> +
-  </div_grafik> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'H' ?????? FIXME +
- +
-Prefix 'I' indholdsstof: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_indholdsstof sogenr="Innnn"> +
-    <indholdsstof>XXXXXXX</indholdsstof> +
-    <form1></form1> +
-    <form2></form2> +
-    <form3></form3> +
-    <form4></form4> +
-  </div_indholdsstof> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'K' klage: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_klage sogenr="Knnnnnn"> +
-    <kode></kode> +
-    <klage>XXXXXXXXXXXXXXXX</klage> +
-    <bemaerkning></bemaerkning> +
-  </div_klage> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'L' ?????? FIXME +
- +
-Prefix 'M' ?????? FIXME +
- +
-Prefix 'N' ?????? FIXME +
- +
-Prefix 'O' oversigt: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_oversigt sogenr="Onnnnn"> +
-    <navn>XXXXXXXX</navn> +
-    <bemaerkning>XXXXXXXXXXXXXXXXX</bemaerkning> +
-  </div_oversigt> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'P' postnummer: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_postnummer sogenr="Pnnnnn"> +
-    <postnummer>nnnn</postnummer> +
-    <by_gade>XXXXX</by_gade> +
-    <kbh>XXXXXXX</kbh> +
-    <amtsnr>nnn</amtsnr> +
-    <kommunenr>nnn</kommunenr> +
-    <regionnavn></regionnavn> +
-    <kommunenavn></kommunenavn> +
-  </div_postnummer> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'R' ?????? FIXME +
- +
-Prefix 'T' type: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_type sogenr="Tnnnnnn"> +
-    <type>XXXXXXXXXXX</type> +
-    <bemaerkning1></bemaerkning1> +
-    <bemaerkning2></bemaerkning2> +
-    <bemaerkning3></bemaerkning3> +
-    <recept></recept> +
-  </div_type> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'U' undersoegelse: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_undersoegelse sogenr="Unnnnn"> +
-    <kode></kode> +
-    <undersoegelse>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</undersoegelse> +
-    <bemaerkning></bemaerkning> +
-    <udregning></udregning> +
-  </div_undersoegelse> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-Prefix 'V' ?????? FIXME +
- +
-Prefix 'W' ?????? FIXME +
- +
-Prefix 'Y' ydelse: +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <div_ydelse sogenr="Ynnnnn"> +
-    <nr></nr> +
-    <navn></navn> +
-    <gr1>0.000000</gr1> +
-    <gr2>0.000000</gr2> +
-    <privat>0</privat> +
-    <journal1></journal1> +
-    <journal2></journal2> +
-    <moms></moms> +
-  </div_ydelse> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
- +
-====Get Aftale All by Date and Calendar==== +
-<code>/praxisd/1.0/aftale/get_all_by_date_and_calendar</code> +
-Parameters: +
-  * calendar The calendar number to show [1-N]. +
-  * year the year to show. +
-  * month the month to show. +
-  * day the day to show. +
-//Returns// xml structure with matching calendar entries\\ +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <aftale date="2011-03-16 01:00:00" calendar="17"> +
-    <cpr>nnnnnnnnnnn</cpr> +
-    <cref></cref> +
-    <cmrk>X</cmrk> +
-    <ctxt>XXXXXXXXXXXXXXXXXX</ctxt> +
-    <cres></cres> +
-  </aftale> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-====Get Aftale All by CPR==== +
-<code>/praxisd/1.0/aftale/get_all_by_cpr</code> +
-Parameters: +
-  * cpr the patient to make calendar lookups for. +
- +
-//Returns// xml structure with matching calendar entries\\ +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <aftale date="2011-04-07 13:50:00" calendar="12"> +
-    <cpr>nnnnnnnnnn</cpr> +
-    <cref>msh</cref> +
-    <cmrk>x</cmrk> +
-    <ctxt>XXXXXXXXXXXXXXXXXXXXXXX</ctxt> +
-    <cres>EL</cres> +
-  </aftale> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
- +
-====Authenticate==== +
-<code>/praxisd/1.0/user/authenticate</code> +
-Validate a username and password against the pcpraxis user db. NOTE: this is not needed in order to communicate with the server. Not event POSTs. +
-Parameters: +
-  * user the username +
-  * pass the password +
-//Returns// http errorcode 401 (unauthorized) if not successful 200 (OK) otherwise. +
- +
-====Get Name by UserID==== +
-<code>/praxisd/1.0/user/get_name_by_id</code> +
-Parameters: +
-  * user the username to look up. +
-//Returns// the plaintext utf-8 name connected with the userid. +
- +
-====Get All DokMenu by CPR==== +
-<code>/praxisd/1.0/dokmenu/get_all_by_cpr</code> +
-Shows the complete dokmenu for a given patient id. +
-Parameters: +
-  * cpr the patient id. +
-//Returns// xml structure with dokmenu entries\\ +
-<code xml> +
-<?xml version="1.0" encoding="UTF-8"?> +
-<praxisd version="1.0"> +
-  <dokmenu cpr="nnnnnnnnn"> +
-    <group>XXXXXXXXXXXX</group> +
-    <subject>XXXXXXXXXXXXXXXXXXXXXX</subject> +
-    <filename filesize="1371" date="2010-05-05 09:25:10">XXXXXXXX</filename> +
-  </dokmenu> +
-   . +
-   . +
-   . +
-</praxisd> +
-</code> +
- +
-====Get DokMenu by Name and CPR==== +
-<code>/praxisd/1.0/dokmenu/get_by_cpr_and_name</code> +
-Fetch contents of a file in the dokmenu by using its filename. +
-Parameters: +
-  * cpr the patient id+
-  * name the name of the file to be fetched. +
-//Returns// the raw unformatted contents of the file. +
- +
- +
- +
-=====POST===== +
- +
-====Add To Journal==== +
-<code>/praxisd/1.0/journal/add</code> +
-Add text to the journal. +
-<code xml> +
-<praxisd version="1.0"> +
-  <journal cpr="nnnnnnnnnn" [replace="true|false"] [header="true|false"]>Text to add properly formatted</journal> +
-</praxisd> +
-</code> +
- +
-====Update Patient==== +
-<code>/* /praxisd/1.0/patient/update */</code> +
-FIXME Not yet implemented. +
- +
-====Add Sogeord to Patient==== +
-<code>/praxisd/1.0/patient/add_sogeord</code> +
-<code xml> +
-<praxisd version="1.0"> +
-  <addsogeord cpr="nnnnnnnnnn"> +
-    <sogeord sogenr="XYZUVW" date="2009-08-17">sogtxt</sogeord> +
-     . +
-     . +
-     . +
-  </addsogeord> +
-</praxisd> +
-</code> +
- +
-====Update Aftale==== +
-<code>/praxisd/1.0/aftale/update</code> +
-In the xml both the old and the new contents must be present in order for the server to be able to verify that no changes were made since the original was last fetched. +
-<code xml> +
-<praxisd version="1.0"> +
-  <aftale date="2009-08-17 11:12:00" calendar="1" original="true"> +
-    <cpr>nnnnnnnnnnn</cpr> +
-    <cref>Blabla!</cref> +
-    <cmrk>x</cmrk> +
-    <ctxt>Text and bla</ctxt> +
-    <cres>More bla</cres> +
-  </aftale> +
-  <aftale date="2009-09-20 10:10:00" calendar="2" [original="false"]> +
-    <cpr>nnnnnnnnnnn</cpr> +
-    <cref>Newbla!</cref> +
-    <cmrk>y</cmrk> +
-    <ctxt>New Text and bla</ctxt> +
-    <cres>New bla</cres> +
-  </aftale> +
-</praxisd+
-</code> +
- +
-====Add Aftale==== +
-<code>/praxisd/1.0/aftale/add</code> +
-<code xml> +
-<praxisd version="1.0"> +
-  <aftale date="2009-09-20 10:10:00" calendar="2"> +
-    <cpr>nnnnnnnnnn</cpr> +
-    <cref>Newbla!</cref> +
-    <cmrk>y</cmrk> +
-    <ctxt>New Text and bla</ctxt> +
-    <cres>New bla</cres> +
-  </aftale> +
-</praxisd> +
-</code> +
- +
-====Delete Aftale==== +
-<code>/praxisd/1.0/aftale/delete</code> +
-Delete the matching calendar entry. +
-<code xml> +
-<praxisd version="1.0"> +
-  <aftale date="2009-09-20 10:10:00" calendar="2"/> +
-</praxisd> +
-</code> +
- +
-====Add File to DokMenu==== +
-<code>/praxisd/1.0/dokmenu/add</code> +
-Upload file to dokmenu. +
-<code xml> +
-<praxisd version="1.0"> +
-  <dokmenu cpr="nnnnnnnnnn"> +
-    <group>Group text bla</group> +
-    <subject>Subject text bla</subject> +
-    <file [name="88888888.333" | extension="333"] [date="YYYY-MM-DD HH:MM:SS] [base64="true|false"]>file content</file> +
-  </dokmenu> +
-</praxisd> +
-</code> +
- +
-====Delete File from DokMenu==== +
-<code>/praxisd/1.0/dokmenu/delete</code> +
-Delete a file from the dokmenu. +
-<code xml> +
-<praxisd version="1.0"> +
-  <dokmenu cpr="nnnnnnnnnn" name="filename.ext"/> +
-</praxisd> +
-</code> +
pracro/praxisd.1318336434.txt.gz · Last modified: 2011/10/11 14:33 by deva