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
Next revisionBoth sides next revision
pracro:praxisd [2011/04/18 14:53] devapracro:praxisd [2011/12/08 10:16] deva
Line 378: Line 378:
 </praxisd> </praxisd>
 </code> </code>
 +
  
 ====Authenticate==== ====Authenticate====
 <code>/praxisd/1.0/user/authenticate</code> <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 PUTs.+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: Parameters:
   * user the username   * user the username
Line 393: Line 394:
 //Returns// the plaintext utf-8 name connected with the userid. //Returns// the plaintext utf-8 name connected with the userid.
  
-====Get All Docmenu by CPR====+====Get All DokMenu by CPR====
 <code>/praxisd/1.0/dokmenu/get_all_by_cpr</code> <code>/praxisd/1.0/dokmenu/get_all_by_cpr</code>
-Shows the complete docmenu for a given patient id.+Shows the complete dokmenu for a given patient id.
 Parameters: Parameters:
   * cpr the patient id.   * cpr the patient id.
-//Returns// xml structure with docmenu entries\\+//Returns// xml structure with dokmenu entries\\
 <code xml> <code xml>
 <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
Line 413: Line 414:
 </code> </code>
  
-====Get Docmenu by Name and CPR====+====Get DokMenu by Name and CPR====
 <code>/praxisd/1.0/dokmenu/get_by_cpr_and_name</code> <code>/praxisd/1.0/dokmenu/get_by_cpr_and_name</code>
-Fetch contents of a file in the docmenu by using its filename.+Fetch contents of a file in the dokmenu by using its filename.
 Parameters: Parameters:
   * cpr the patient id.   * cpr the patient id.
Line 424: Line 425:
  
 =====POST===== =====POST=====
 +
 ====Add To Journal==== ====Add To Journal====
 <code>/praxisd/1.0/journal/add</code> <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==== ====Update Patient====
 <code>/* /praxisd/1.0/patient/update */</code> <code>/* /praxisd/1.0/patient/update */</code>
 +FIXME Not yet implemented.
  
 ====Add Sogeord to Patient==== ====Add Sogeord to Patient====
 <code>/praxisd/1.0/patient/add_sogeord</code> <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==== ====Update Aftale====
 <code>/praxisd/1.0/aftale/update</code> <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>
 +NOTE: All fields are truncated to their respective database column sizes without notice.
 +
 +On success the server replies with the http statuscode 200: OK
 +
 +Some of the fail states are:
 +  * The updated aftale is identical to the one already in the database. This does **not** result in an error, but will leave the database untouched.
 +  * The current aftale in the database is no identical to the aftale marked "original" in the xml. This will result in a http errror 400: Bad Request with the body "Source changed".
 +  * The original does not exist in the database (is was deleted or never added). The server responds with a http err 400: Bad request and body: "IsamError 10200".
  
 ====Add Aftale==== ====Add Aftale====
 <code>/praxisd/1.0/aftale/add</code> <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==== ====Delete Aftale====
 <code>/praxisd/1.0/aftale/delete</code> <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 Docmenu====+ 
 +====Add File to DokMenu====
 <code>/praxisd/1.0/dokmenu/add</code> <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 Docmenu====+====Delete File from DokMenu====
 <code>/praxisd/1.0/dokmenu/delete</code> <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.txt · Last modified: 2011/12/08 10:18 by deva