Memdoc Restfull APIv1
TOC

Memdoc Restfull API

Introduction

Version

v1

Author

Swiss RDL

Description

The following document describe the RESTful API of the Memdoc system.

Authentication Schemes

Base URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo

Index of Resources and Operations

  1. Authentication
    1. Login
    2. Logout
    3. Secure login
  2. Form
    1. Create a form
    2. Delete a form
    3. Submit a form
  3. Implant
    1. Create implants
  4. Import
    1. Import (Patients, forms and implants)
  5. Patient
    1. Create a patient
    2. Delete a patient
    3. Get patient details
    4. Update a patient
  6. Patientform
    1. Create a patient with forms.
    2. Get patient details and a specific form access
    3. Get patient details and form urls

1. Authentication

Description

This resource represents the Authentication

Resource URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo

1.1 Login

Description

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/auth

URI Parameters

n/a

HTTP Method

PUT or POST

Resource Formats

Authentication

not required

Request Entities

Format: application/json
                                                            
                                                                {
                                                                    "username": "demouser",
                                                                    "password": "demopassword"
                                                                }
                                                            
                                                    
Format: application/xml
                                                            
                                                                <authenticateRequest>
                                                                    <username>demouser</username>
                                                                    <password>demopassword</password>
                                                                </authenticateRequest>
                                                            
                                                    

Responses

200 OK

Response Entities

Format: application/json
                                                        {
                                                                  "success": true,
                                                                  "token": "231464572-1402851376-2-101-en"
                                                        }
                                                    
Format: application/json
                                                        {
                                                            "success": false,
                                                            "errors": [
                                                                  {
                                                                    "message": "Authentication failed"
                                                                  },
                                                                  {
                                                                    "code": "Exception",
                                                                    "message": "org.memdoc.www.yosemite.wsclient.module.entities.generated.InternalModuleErrorException_Exception: EXCEPTIONID (901138259), loginToModule failed. Message [Array\n(\n    [Error] => bad username or password\n    [sessid] => 8cbcde3508d0d398fcf634b9795f7abd\n)\n] When Reporting this exception, Please provide the exception ID and the date Thu Apr 13 12:40:58 CEST 2017"
                                                                  }
                                                              ]
                                                          }
                                                    
Format: application/xml
                                                            
                                                                <response>
                                                                    <success>true</success>
                                                                    <token>253043559-1748585136-2-101-en</token>
                                                                </response>
                                                            
                                                    
Format: application/xml
                                                            
                                                                <response>
                                                                    <success>false</success>
                                                                    <errors>
                                                                        <error>
                                                                            <message>Authentication failed</message>
                                                                        </error>
                                                                        <error>
                                                                            <code>Exception</code>
                                                                            <message>org.memdoc.www.yosemite.wsclient.module.entities.generated.InternalModuleErrorException_Exception: EXCEPTIONID (1140736683), loginToModule failed. Message [Array
                                                                (
                                                                    [Error] => bad username or password
                                                                    [sessid] => ba0a84110f392b79c01170228ffa90db
                                                                )
                                                                ] When Reporting this exception, Please provide the exception ID and the date Thu Apr 20 10:36:43 CEST 2017</message>
                                                                        </error>
                                                                    </errors>
                                                                </response>
                                                            
                                                    

1.2 Logout

Description

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/auth/logout?token={token-id}

URI Parameters

{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

PUT or POST

Resource Formats

Authentication

required

Request Entities

Responses

Response Entities

1.3 Secure login

Description

Identical to the normal login, but in this case the password hash (SHA-256) must be sent

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/secureauth

URI Parameters

n/a

HTTP Method

PUT or POST

Resource Formats

Authentication

required

Request Entities

Responses

Response Entities

2. Form

Description

This resource represents a form.

Resource URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients/{mrn}/forms
dept-id
department ID
mrn
patient mrn

2.1 Create a form

Description

Creates a new form.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients/{mrn}/forms?token={token-id}&saveinc={saveinc}&autosubmit={autosubmit}

URI Parameters

dept-id
department ID
mrn
patient mrn
{token-id}
token id, e.g 231464572-1402851376-2-101-en
{saveinc}
Save incomplete, true or false
{autosubmit}
Auto submit (true/false), true will submit the form

HTTP Method

PUT or POST

Resource Formats

Authentication

required

Request Entities

Format: application/json
                                                    
                                                             {
                                                                "name": "SIRIS_HIP_PRIM_2015",
                                                                "version": "V1",
                                                                "formcreatedby": "2",
                                                                "formlanguage": "en",
                                                                "answers": [
                                                                 {
                                                                  "questionname": "IV_DATE_QUESTION",
                                                                  "values": [
                                                                       "06.04.2015"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "IV_LOCATION_QUESTION",
                                                                  "values": [
                                                                       "1"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "PREVIOUS_SURGERY",
                                                                  "values": [
                                                                       "3"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "SIRIS_FORMAT",
                                                                  "values": [
                                                                       "1"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "MORBIDITY_STATE",
                                                                  "values": [
                                                                       "2"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "APPROACH",
                                                                  "values": [
                                                                       "2"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "PAT_POSITION",
                                                                  "values": [
                                                                       "1"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "IV_PROCEDURE_QUESTION",
                                                                  "values": [
                                                                       "3"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "IV_PROCEDURE_QUESTION2",
                                                                  "values": [
                                                                       "1"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "ADD_INTERVENTION",
                                                                  "values": [
                                                                       "2"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "HEIGHT",
                                                                  "values": [
                                                                       "180"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "WEIGHT",
                                                                  "values": [
                                                                       "70"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "RESTRICTION",
                                                                  "values": [
                                                                       "2"
                                                                  ]
                                                                 },
                                                                  {
                                                                  "questionname": "CEMENTING_TECHNIQUE",
                                                                  "values": [
                                                                       "2"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "IV_IMPLANT_TRACKING",
                                                                  "values": [
                                                                       "1"
                                                                  ]
                                                                 },
                                                                 {
                                                                  "questionname": "IV_PATHOLOGY_QUESTION",
                                                                  "values": [
                                                                       "3"
                                                                  ]
                                                                 }
                                                                ],
                                                                "implants": [
                                                                   {
                                                                         "barcode1": "01076300308074421721062910162327"
                                                                   },
                                                                   {
                                                                         "barcode1": "01076300308082031721041810160207", "barcode2": "01076300308082031721041810160201"
                                                                   },
                                                                   {
                                                                         "articlenumber": "ZA90030235", "companyname": "4517-2-856", "lotnumber" : "4436391008", "description" : ""
                                                                   }
                                                                ]
                                                            }
                                                    
Format: application/xml
                                                        <form>
                                                            <formdataid>10254886</formdataid>
                                                            <name>SIRIS_HIP_PRIM_2015</name>
                                                            <version>V1</version>
                                                            <formcreatedby>2</formcreatedby>
                                                            <formlanguage>en</formlanguage>
                                                            <answers>
                                                                <answer>
                                                                    <questionname>IV_DATE_QUESTION</questionname>
                                                                    <values>
                                                                        <value>06.04.2015</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>IV_LOCATION_QUESTION</questionname>
                                                                    <values>
                                                                        <value>1</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>PREVIOUS_SURGERY</questionname>
                                                                    <values>
                                                                        <value>3</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>SIRIS_FORMAT</questionname>
                                                                    <values>
                                                                        <value>1</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>MORBIDITY_STATE</questionname>
                                                                    <values>
                                                                        <value>2</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>APPROACH</questionname>
                                                                    <values>
                                                                        <value>2</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>PAT_POSITION</questionname>
                                                                    <values>
                                                                        <value>1</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>IV_PROCEDURE_QUESTION</questionname>
                                                                    <values>
                                                                        <value>3</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>IV_PROCEDURE_QUESTION2</questionname>
                                                                    <values>
                                                                        <value>1</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>ADD_INTERVENTION</questionname>
                                                                    <values>
                                                                        <value>2</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>HEIGHT</questionname>
                                                                    <values>
                                                                        <value>180</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>WEIGHT</questionname>
                                                                    <values>
                                                                        <value>70</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>RESTRICTION</questionname>
                                                                    <values>
                                                                        <value>2</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>CEMENTING_TECHNIQUE</questionname>
                                                                    <values>
                                                                        <value>2</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>IV_IMPLANT_TRACKING</questionname>
                                                                    <values>
                                                                        <value>1</value>
                                                                    </values>
                                                                </answer>
                                                                <answer>
                                                                    <questionname>IV_PATHOLOGY_QUESTION</questionname>
                                                                    <values>
                                                                        <value>3</value>
                                                                    </values>
                                                                </answer>
                                                            </answers>
                                                            <implants>
                                                                <implant>
                                                                    <barcode1>01076300308074421721062910162327</barcode1>
                                                                </implant>
                                                                <implant>
                                                                    <barcode1>01076300308082031721041810160207</barcode1>
                                                                    <barcode2>01076300308082031721041810160201</barcode2>
                                                                </implant>
                                                                <implant>
                                                                    <articlenumber>ZA90030235</articlenumber>
                                                                    <companyname>4517-2-856</companyname>
                                                                    <description></description>
                                                                    <lotnumber>4436391008</lotnumber>
                                                                </implant>
                                                            </implants>
                                                        </form>
                                                    

Responses

201 Created
The data set is returned as the response entity.
404 Not Found
There is no patient with this patient MRN.

Response Entities

Format: application/json
                                                    
                                                             {
                                                              "success": true,
                                                              "form": {
                                                                    "formdataid": 10254751,
                                                                    "name": "SIRIS_HIP_PRIM_2015",
                                                                    "version": "V1",
                                                                    "formcreatedby": "2",
                                                                    "formlanguage": "en",
                                                                    "answers": [
                                                                      {
                                                                            "questionname": "IV_DATE_QUESTION",
                                                                            "values": [
                                                                              "06.04.2015"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "IV_LOCATION_QUESTION",
                                                                            "values": [
                                                                              "1"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "PREVIOUS_SURGERY",
                                                                            "values": [
                                                                              "3"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "SIRIS_FORMAT",
                                                                            "values": [
                                                                              "1"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "MORBIDITY_STATE",
                                                                            "values": [
                                                                              "2"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "APPROACH",
                                                                            "values": [
                                                                              "2"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "PAT_POSITION",
                                                                            "values": [
                                                                              "1"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "IV_PROCEDURE_QUESTION",
                                                                            "values": [
                                                                              "3"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "IV_PROCEDURE_QUESTION2",
                                                                            "values": [
                                                                              "1"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "ADD_INTERVENTION",
                                                                            "values": [
                                                                              "2"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "HEIGHT",
                                                                            "values": [
                                                                              "180"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "WEIGHT",
                                                                            "values": [
                                                                              "70"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "RESTRICTION",
                                                                            "values": [
                                                                              "2"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "CEMENTING_TECHNIQUE",
                                                                            "values": [
                                                                              "2"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "IV_IMPLANT_TRACKING",
                                                                            "values": [
                                                                              "1"
                                                                            ]
                                                                      },
                                                                      {
                                                                            "questionname": "IV_PATHOLOGY_QUESTION",
                                                                            "values": [
                                                                              "3"
                                                                            ]
                                                                      }
                                                                    ],
                                                                    "implants": [
                                                                      {
                                                                                    "barcode1": "01076300308074421721062910162327"
                                                                              },
                                                                              {
                                                                                    "barcode1": "01076300308082031721041810160207", "barcode2": "01076300308082031721041810160201"
                                                                              },
                                                                              {
                                                                                    "articlenumber": "ZA90030235", "companyname": "4517-2-856", "lotnumber" : "4436391008", "description" : ""
                                                                              }
                                                                    ]
                                                              },
                                                              "submitted": false
                                                            }
                                                    
Format: application/xml
                                                        <response>
                                                            <success>true</success>
                                                            <form>
                                                                <formdataid>10254885</formdataid>
                                                                <name>SIRIS_HIP_PRIM_2015</name>
                                                                <version>V1</version>
                                                                <formcreatedby>2</formcreatedby>
                                                                <formlanguage>en</formlanguage>
                                                                <answers>
                                                                    <answer>
                                                                        <questionname>IV_DATE_QUESTION</questionname>
                                                                        <values>
                                                                            <value>06.04.2015</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>IV_LOCATION_QUESTION</questionname>
                                                                        <values>
                                                                            <value>1</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>PREVIOUS_SURGERY</questionname>
                                                                        <values>
                                                                            <value>3</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>SIRIS_FORMAT</questionname>
                                                                        <values>
                                                                            <value>1</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>MORBIDITY_STATE</questionname>
                                                                        <values>
                                                                            <value>2</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>APPROACH</questionname>
                                                                        <values>
                                                                            <value>2</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>PAT_POSITION</questionname>
                                                                        <values>
                                                                            <value>1</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>IV_PROCEDURE_QUESTION</questionname>
                                                                        <values>
                                                                            <value>3</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>IV_PROCEDURE_QUESTION2</questionname>
                                                                        <values>
                                                                            <value>1</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>ADD_INTERVENTION</questionname>
                                                                        <values>
                                                                            <value>2</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>HEIGHT</questionname>
                                                                        <values>
                                                                            <value>180</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>WEIGHT</questionname>
                                                                        <values>
                                                                            <value>70</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>RESTRICTION</questionname>
                                                                        <values>
                                                                            <value>2</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>CEMENTING_TECHNIQUE</questionname>
                                                                        <values>
                                                                            <value>2</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>IV_IMPLANT_TRACKING</questionname>
                                                                        <values>
                                                                            <value>1</value>
                                                                        </values>
                                                                    </answer>
                                                                    <answer>
                                                                        <questionname>IV_PATHOLOGY_QUESTION</questionname>
                                                                        <values>
                                                                            <value>3</value>
                                                                        </values>
                                                                    </answer>
                                                                </answers>
                                                                <implants>
                                                                    <implant>
                                                                        <barcode1>01076300308074421721062910162327</barcode1>
                                                                    </implant>
                                                                    <implant>
                                                                        <barcode1>01076300308082031721041810160207</barcode1>
                                                                        <barcode2>01076300308082031721041810160201</barcode2>
                                                                    </implant>
                                                                    <implant>
                                                                        <articlenumber>ZA90030235</articlenumber>
                                                                        <companyname>4517-2-856</companyname>
                                                                        <description></description>
                                                                        <lotnumber>4436391008</lotnumber>
                                                                    </implant>
                                                                </implants>
                                                            </form>
                                                            <submitted>false</submitted>
                                                        </response>
                                                    
							
								 {
								  "success": false,
								  "errors": [
									{
									  "code": "PatientNotFound",
									  "message": "Patient not found"
									}
								  ]
								}
							
Format: application/xml
                                                    
                                                        <response>
                                                            <success>false</success>
                                                            <errors>
                                                                <error>
                                                                    <code>PatientNotFound</code>
                                                                    <message>Patient not found</message>
                                                                </error>
                                                            </errors>
                                                        </response>
                                                    

2.2 Delete a form

Description

Deletes a form.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients/{mrn}/forms/{form-id}?token={token-id}

URI Parameters

dept-id
department ID
mrn
patient mrn
{form-id}
form ID
{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

DELETE

Resource Formats

Authentication

required

Request Entities

n/a

Responses

200 OK
Operation success information is returned as the response entity.
404 Not Found
There is no patient with this patient MRN.
404 Not Found
There is no form with this form ID.

Response Entities

Format: application/json
                                                
                                                    {
                                                       "success": "true"
                                                    }
                                                
Format: application/json
                                                
                                                    {
                                                        "success": false,
                                                        "errors": [
                                                            {
                                                              "code": "PatientNotFound",
                                                              "message": "Patient not found"
                                                            }
                                                        ]
                                                   }
                                                
Format: application/json
                                                
                                                    {
                                                        "success": false,
                                                        "errors": [
                                                            {
                                                              "message": "Not found form data with id = ..."
                                                            }
                                                       ]
                                                    }
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>true</success>
                                                    </response>
                                                
Format: application/xml
                                                    
                                                        <response>
                                                            <success>false</success>
                                                            <errors>
                                                                <error>
                                                                    <code>PatientNotFound</code>
                                                                    <message>Patient not found</message>
                                                                </error>
                                                            </errors>
                                                        </response>
                                                    
Format: application/xml
                                                
                                                    <response>
                                                        <success>false</success>
                                                        <errors>
                                                            <error>
                                                                <message>Not found form data with id = ...</message>
                                                            </error>
                                                        </errors>
                                                    </response>
                                                

2.3 Submit a form

Description

Submit a form.(formSubmitterId is mandatory)

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients/{mrn}/forms/{form-id}/submit?token={token-id}

URI Parameters

dept-id
department ID
mrn
patient mrn
{form-id}
form ID
{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

PUT

Resource Formats

Authentication

required

Request Entities

Format: application/json
                                                
                                                    {
                                                       "formSubmitterId" : "1"
                                                    }
                                                
Format: application/xml
                                                
                                                    <submitFormRequest>
                                                        <formSubmitterId>1</formSubmitterId>
                                                    </submitFormRequest>
                                                

Responses

200 OK
Operation success information is returned as the response entity.
404 Not Found
There is no patient with this patient MRN.
404 Not Found
There is no form with this form ID.

Response Entities

Format: application/json
                                                
                                                    {
                                                       "success": "true"
                                                    }
                                                
Format: application/json
                                                
                                                    {
                                                        "success": false,
                                                        "errors": [
                                                            {
                                                              "code": "PatientNotFound",
                                                              "message": "Patient not found"
                                                            }
                                                        ]
                                                   }
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>true</success>
                                                    </response>
                                                
Format: application/xml
                                                    
                                                        <response>
                                                            <success>false</success>
                                                            <errors>
                                                                <error>
                                                                    <code>PatientNotFound</code>
                                                                    <message>Patient not found</message>
                                                                </error>
                                                            </errors>
                                                        </response>
                                                    

3. Implant

Description

This resource represents an implant.

Resource URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients/{mrn}/forms/{form-id}/implants
dept-id
department ID
mrn
patient mrn
form-id
form ID

3.1 Create implants

Description

Creates a new form.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients/{mrn}/forms/{form-id}/implants?token={token-id}&lang={lang}

URI Parameters

dept-id
department ID
mrn
patient mrn
form-id
form ID
{token-id}
token id, e.g 231464572-1402851376-2-101-en
{lang}
language (en | de | fr ...)

HTTP Method

POST

Resource Formats

Authentication

required

Request Entities

Format: application/json
                                                    
                                                        {
                                                            "implants": [
                                                                {
                                                                 "articlenumber": "14.42.28.43B",
                                                                 "companyname": "Centerpulse",
                                                                 "lotnumber": "CUPULE MOBILE RETENTIVE D28/43"
                                                                },
                                                                {
                                                                 "barcode1": "0104260102130005171608311075704325",
                                                                 "barcode2": "",
                                                                 "separator": ""
                                                                },
                                                                {
                                                                 "articlenumber": "01.06055.006",
                                                                 "companyname": "Zimmer",
                                                                 "description": "tige pf standard t6"
                                                                }
                                                            ]
                                                         }
                                                    
Format: application/xml
                                                        
                                                            <implants>
                                                                <implant>
                                                                    <barcode1>01076300308074421721062910162327</barcode1>
                                                                </implant>
                                                                <implant>
                                                                    <barcode1>01076300308082031721041810160207</barcode1>
                                                                    <barcode2>01076300308082031721041810160201</barcode2>
                                                                </implant>
                                                                <implant>
                                                                    <articlenumber>ZA90030235</articlenumber>
                                                                    <companyname>4517-2-856</companyname>
                                                                    <description></description>
                                                                    <lotnumber>4436391008</lotnumber>
                                                                </implant>
                                                            </implants>
                                                        
                                                    

Responses

200 OK
Operation success information is returned as the response entity.
404 Not Found
There is no patient with this patient MRN.
404 Not Found
There is no form with this form ID.

Response Entities

                                                
                                                         {
                                                            "success": "true"
                                                         }
                                                
Format: application/json
                                                
                                                    {
                                                        "success": false,
                                                        "errors": [
                                                            {
                                                              "code": "PatientNotFound",
                                                              "message": "Patient not found"
                                                            }
                                                        ]
                                                   }
                                                
Format: application/json
                                                
                                                    {
                                                        "success": false,
                                                        "errors": [
                                                            {
                                                              "message": "Not found form data with id = ..."
                                                            }
                                                       ]
                                                    }
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>true</success>
                                                    </response>
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>false</success>
                                                        <errors>
                                                            <error>
                                                                <code>PatientNotFound</code>
                                                                <message>Patient not found</message>
                                                            </error>
                                                        </errors>
                                                    </response>
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>false</success>
                                                        <errors>
                                                            <error>
                                                                <message>Not found form data with id = ...</message>
                                                            </error>
                                                        </errors>
                                                    </response>
                                                

4. Import

Description

This resource represents a list of patients with forms.

Resource URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/imports

4.1 Import (Patients, forms and implants)

Description

Import all patients and forms in xml format.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/imports?token={token-id}&saveinc={saveinc}&autosubmit={autosubmit}

URI Parameters

{token-id}
token id, e.g 231464572-1402851376-2-101-en
{saveinc}
Save incomplete, true or false
{autosubmit}
Auto submit (true/false), true will submit the form

HTTP Method

PUT

Resource Formats

Authentication

required

Request Entities

Format: application/xml
                                                        <import xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                                                                    <patients>
                                                                        <patient>
                                                                            <departmentid>1</departmentid>
                                                                            <mrn>restserver_test_6</mrn>
                                                                            <dob>30.04.1999</dob>
                                                                            <gender>f</gender>
                                                                            <firstname>Rest</firstname>
                                                                            <lastname>Rest</lastname>
                                                                            <familynameatbirth>Test</familynameatbirth>
                                                                            <countryofbirth>de</countryofbirth>
                                                                            <cityofbirth>Berlin</cityofbirth>
                                                                            <country>ch</country>
                                                                            <city>Bern</city>
                                                                            <streetname>XptoStrass</streetname>
                                                                            <streetnumber>34</streetnumber>
                                                                            <zipcode>3000</zipcode>
                                                                            <phone>123123</phone>
                                                                            <email>adasdsa@gmail.xpt</email>
                                                                            <language>de</language>
                                                                            <createdby>1</createdby>
                                                                            <forms>
                                                                                <form>
                                                                                    <name>SIRIS_HIP_PRIM</name>
                                                                                    <version>V1</version>
                                                                                    <subversion>0</subversion>
                                                                                    <formcreatedby>1</formcreatedby>
                                                                                    <formlanguage>en</formlanguage>
                                                                                    <answers>
                                                                                        <answer>
                                                                                            <questionname>SIRIS_FORMAT</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>	
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_PATHOLOGY_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>	
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>PREVIOUS_SURGERY</questionname>
                                                                                            <values>
                                                                                                <value>4</value>
                                                                                                <value>5</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_DATE_QUESTION</questionname>	
                                                                                            <values>
                                                                                                <value>01.10.2013</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_LOCATION_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_PROCEDURE_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>5</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_PROCEDURE_QUESTION2</questionname>
                                                                                            <values>
                                                                                                <value>2</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>TECHNOLOGY</questionname>
                                                                                            <values>
                                                                                                <value>2</value>
                                                                                            </values>
                                                                                        </answer>	
                                                                                        <answer>
                                                                                            <questionname>IV_IMPLANT_TRACKING</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                    </answers>	
                                                                                    <implants>
                                                                                        <implant>
                                                                                            <articlenumber>AR40E00235</articlenumber>
                                                                                            <companyname>Abbott Medical Optics</companyname>
                                                                                            <lotnumber>4500361010</lotnumber>
                                                                                            <description>SENSAR OptiEdge AR40e ACRYL IOL23,5</description>
                                                                                        </implant>
                                                                                        <implant>
                                                                                            <barcode1>+H4411365283301D</barcode1>
                                                                                            <barcode2>+$$31704303451246D3</barcode2>
                                                                                            <separator></separator>
                                                                                        </implant>
                                                                                        <implant>
                                                                                            <articlenumber>L74052</articlenumber>
                                                                                            <companyname>DePuy</companyname>
                                                                                            <lotnumber></lotnumber>
                                                                                            <description>Lagoon cup</description>
                                                                                        </implant>
                                                                                        <cement>
                                                                                            <articlenumber>4246</articlenumber>
                                                                                            <companyname>Zimmer</companyname>
                                                                                            <lotnumber>2132313</lotnumber>
                                                                                            <description>ALLOFIT Schale/Polverschluss 54/JJ</description>
                                                                                        </cement>
                                                                                        <cement>
                                                                                            <articlenumber>01.06055.006</articlenumber>
                                                                                            <companyname>Zimmer</companyname>
                                                                                            <lotnumber>23232</lotnumber>
                                                                                            <description>tige pf standard t6</description>
                                                                                        </cement>
                                                                                    </implants>
                                                                                </form>		
                                                                                <form>
                                                                                    <name>SIRIS_KNEE_PRIM</name>
                                                                                    <version>V1</version>
                                                                                    <subversion>0</subversion>
                                                                                    <formcreatedby>1</formcreatedby>
                                                                                    <answers>
                                                                                        <answer>
                                                                                            <questionname>SIRIS_FORMAT</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>	
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_PATHOLOGY_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>2</value>
                                                                                            </values>	
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>PREV_SURGERY</questionname>
                                                                                            <values>
                                                                                                <value>3</value>
                                                                                                <value>4</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>NO_PREVSURG</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_DATE_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>14.01.2014</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_LOCATION_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_PROCEDURE_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>3</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>FIX_COMPS</questionname>
                                                                                            <values>
                                                                                                <value>2</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>TECHNOLOGY</questionname>
                                                                                            <values>
                                                                                                <value>2</value>
                                                                                                <value>3</value>
                                                                                            </values>
                                                                                        </answer>	
                                                                                        <answer>
                                                                                            <questionname>PAT_COMP_Y_N</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>	
                                                                                        <answer>
                                                                                            <questionname>PAT_TYPE</questionname>
                                                                                            <values>
                                                                                                <value>4</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>JETLAVAGE</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>FEMCEM_TYPE</questionname>
                                                                                            <values>
                                                                                                <value>2</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>FEMCEM_ADD_ON</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>VACUUM</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_IMPLANT_TRACKING</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                    </answers>
                                                                                    <implants>
                                                                                        <implant>
                                                                                            <barcode1>+EMIN011813519</barcode1>
                                                                                            <barcode2>+$$12171247559Y</barcode2>
                                                                                            <separator></separator>
                                                                                        </implant>
                                                                                    </implants>					
                                                                                </form>		
                                                                                <form>
                                                                                    <name>SIRIS_KNEE_FU</name>
                                                                                    <version>V1</version>
                                                                                    <subversion>0</subversion>
                                                                                    <formcreatedby>1</formcreatedby>
                                                                                    <answers>
                                                                                        <answer>
                                                                                            <questionname>DEATH</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>	
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>SIRIS_FORMAT</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>	
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_DATE_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>17.02.2014</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_LOCATION_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_PROCEDURE_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>2</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>NUMBER_ARTHROPLAS</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>RAD_CLIEVAL_FE_COMP</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>RAD_CLIEVAL_STEM</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>	
                                                                                        <answer>
                                                                                            <questionname>RAD_CLIEVAL_PAT_COMP</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>INFECTION</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>PATIENT_SATISFACTION</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>DECISION</questionname>
                                                                                            <values>
                                                                                                <value>3</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                    </answers>
                                                                                    <implants>
                                                                                    </implants>									
                                                                                </form>
                                                                            </forms>
                                                                        </patient>
                                                                        <patient>
                                                                            <departmentid>1</departmentid>
                                                                            <mrn>restserver_4</mrn>
                                                                            <dob>12.03.1920</dob>
                                                                            <gender>m</gender>
                                                                            <firstname>Siris</firstname>
                                                                            <lastname>Webservice</lastname>
                                                                            <ssn>7564414906202</ssn>
                                                                            <createdby>1</createdby>
                                                                            <forms>
                                                                                <form>
                                                                                    <name>SIRIS_HIP_PRIM</name>
                                                                                    <version>V1</version>
                                                                                    <subversion>0</subversion>
                                                                                    <formcreatedby>145</formcreatedby>
                                                                                    <answers>
                                                                                        <answer>
                                                                                            <questionname>SIRIS_FORMAT</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>	
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_PATHOLOGY_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>	
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>PREVIOUS_SURGERY</questionname>
                                                                                            <values>
                                                                                                <value>4</value>
                                                                                                <value>5</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_DATE_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>01.03.2012</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_LOCATION_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>2</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_SURGEON</questionname>
                                                                                            <values>
                                                                                                <value>145</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_PROCEDURE_QUESTION</questionname>
                                                                                            <values>
                                                                                                <value>5</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>IV_PROCEDURE_QUESTION2</questionname>
                                                                                            <values>
                                                                                                <value>2</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                        <answer>
                                                                                            <questionname>TECHNOLOGY</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>	
                                                                                        <answer>
                                                                                            <questionname>IV_IMPLANT_TRACKING</questionname>
                                                                                            <values>
                                                                                                <value>1</value>
                                                                                            </values>
                                                                                        </answer>
                                                                                    </answers>
                                                                                    <implants>
                                                                                    </implants>									
                                                                                </form>		
                                                                            </forms>
                                                                        </patient>
                                                                    </patients>
                                                                </import>
                                                    

Responses

200 OK
The data set is returned as the response entity.

Response Entities

success
                                                        <file>
                                                                    <parsing>
                                                                        <filename></filename>
                                                                        <haserrors>false</haserrors>
                                                                        <haswarnings>false</haswarnings>
                                                                    </parsing>
                                                                    <patients>
                                                                        <patient>
                                                                            <departmentid>1</departmentid>
                                                                            <mrn>restserver_test_6</mrn>
                                                                            <patientid>128579</patientid>
                                                                            <haserrors>false</haserrors>
                                                                            <haswarnings>false</haswarnings>
                                                                            <forms>
                                                                                <form>
                                                                                    <name>SIRIS_HIP_PRIM</name>
                                                                                    <caseid></caseid>
                                                                                    <clientformdataid></clientformdataid>
                                                                                    <formdataid>10255760</formdataid>
                                                                                    <haserrors>false</haserrors>
                                                                                    <haswarnings>false</haswarnings>
                                                                                </form>
                                                                                <form>
                                                                                    <name>SIRIS_KNEE_PRIM</name>
                                                                                    <caseid></caseid>
                                                                                    <clientformdataid></clientformdataid>
                                                                                    <formdataid>10255761</formdataid>
                                                                                    <haserrors>false</haserrors>
                                                                                    <haswarnings>false</haswarnings>
                                                                                </form>
                                                                                <form>
                                                                                    <name>SIRIS_KNEE_FU</name>
                                                                                    <caseid></caseid>
                                                                                    <clientformdataid></clientformdataid>
                                                                                    <formdataid>10255762</formdataid>
                                                                                    <haserrors>false</haserrors>
                                                                                    <haswarnings>false</haswarnings>
                                                                                </form>
                                                                            </forms>
                                                                        </patient>
                                                                        <patient>
                                                                            <departmentid>1</departmentid>
                                                                            <mrn>restserver_4</mrn>
                                                                            <patientid>128580</patientid>
                                                                            <haserrors>false</haserrors>
                                                                            <haswarnings>false</haswarnings>
                                                                            <forms>
                                                                                <form>
                                                                                    <name>SIRIS_HIP_PRIM</name>
                                                                                    <caseid></caseid>
                                                                                    <clientformdataid></clientformdataid>
                                                                                    <formdataid>10255763</formdataid>
                                                                                    <haserrors>false</haserrors>
                                                                                    <haswarnings>false</haswarnings>
                                                                                </form>
                                                                            </forms>
                                                                        </patient>
                                                                    </patients>
                                                                </file>
                                                    
Example of error message
                                                        <file>
                                                            <parsing>
                                                                <filename></filename>
                                                                <haserrors>false</haserrors>
                                                                <haswarnings>false</haswarnings>
                                                            </parsing>
                                                            <patients>
                                                                <patient>
                                                                    <departmentid>1</departmentid>
                                                                    <mrn>restserver_3</mrn>
                                                                    <patientid></patientid>
                                                                    <haserrors>true</haserrors>
                                                                    <haswarnings>false</haswarnings>
                                                                    <errors>
                                                                        <error>The SSN is invalid.</error>
                                                                    </errors>
                                                                </patient>
                                                                <patient>
                                                                    <departmentid>1</departmentid>
                                                                    <mrn>siris7</mrn>
                                                                    <patientid></patientid>
                                                                    <haserrors>true</haserrors>
                                                                    <haswarnings>false</haswarnings>
                                                                    <errors>
                                                                        <error>The SSN is invalid.</error>
                                                                    </errors>
                                                                </patient>
                                                            </patients>
                                                        </file>
                                                    

5. Patient

Description

This resource represents a patient.

Resource URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients
dept-id
department ID

5.1 Create a patient

Description

Creates a patient.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients?token={token-id}

URI Parameters

dept-id
department ID
{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

POST

Resource Formats

Authentication

required

Request Entities

Format: application/json
                                                
                                                    {
                                                        "mrn": "restserver1",
                                                        "dob": "01.01.1998",
                                                        "gender": "f",
                                                        "lastname": "WebService",
                                                        "firstname": "tango",
                                                        "familynameatbirth": "Test",
                                                        "countryofbirth": "DE",
                                                        "cityofbirth": "Milan",
                                                        "phone": "123123",
                                                        "email": "test@gmail.xpt",
                                                        "streetname": "Strass",
                                                        "streetnumber": "34",
                                                        "city": "Zurich",
                                                        "zipcode": "3000",
                                                        "country": "CH",
                                                        "language": "de"
                                                    }
                                                
Format: application/xml
                                                
                                                    <patient>
                                                        <mrn>restserver1</mrn>
                                                        <dob>01.01.1998</dob>
                                                        <gender>f</gender>
                                                        <lastname>WebService</lastname>
                                                        <firstname>tango</firstname>
                                                        <familynameatbirth>Test</familynameatbirth>
                                                        <countryofbirth>DE</countryofbirth>
                                                        <cityofbirth>Milan</cityofbirth>
                                                        <phone>123123</phone>
                                                        <email>test@gmail.xpt</email>
                                                        <streetname>Strass</streetname>
                                                        <streetnumber>34</streetnumber>
                                                        <city>Zurich</city>
                                                        <zipcode>3000</zipcode>
                                                        <country>CH</country>
                                                        <language>de</language>
                                                    </patient>
                                                

Responses

201 Created
The data set is returned as the response entity.
200 OK
Operation success information is returned as the response entity (e.g MRN already exists).

Response Entities

Format: application/json
                                                
                                                    {
                                                        "success": true,
                                                        "patient": {
                                                          "href": "https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver1",
                                                          "patientid": 128538,
                                                          "departmentid": 1,
                                                          "mrn": "restserver1",
                                                          "dob": "01.01.1998",
                                                          "gender": "f",
                                                          "lastname": "WebService",
                                                          "firstname": "tango",
                                                          "familynameatbirth": "Test",
                                                          "countryofbirth": "DE",
                                                          "cityofbirth": "Milan",
                                                          "phone": "123123",
                                                          "email": "test@gmail.xpt",
                                                          "streetname": "Strass",
                                                          "streetnumber": "34",
                                                          "city": "Zurich",
                                                          "zipcode": "3000",
                                                          "country": "CH",
                                                          "language": "de"
                                                        }
                                                    }
                                                
Format: application/json
                                                
                                                         {
                                                            "success": false,
                                                            "errors": [
                                                              {
                                                                "code": "mrnExists",
                                                                "message": "M.R.N.: this number already exists in the database"
                                                              }
                                                            ]
                                                         }
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>true</success>
                                                        <patient>
                                                            <href>https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver1</href>
                                                            <patientid>128537</patientid>
                                                            <departmentid>1</departmentid>
                                                            <mrn>restserver1</mrn>
                                                            <dob>01.01.1998</dob>
                                                            <gender>f</gender>
                                                            <lastname>WebService</lastname>
                                                            <firstname>tango</firstname>
                                                            <familynameatbirth>Test</familynameatbirth>
                                                            <countryofbirth>DE</countryofbirth>
                                                            <cityofbirth>Milan</cityofbirth>
                                                            <phone>123123</phone>
                                                            <email>test@gmail.xpt</email>
                                                            <streetname>Strass</streetname>
                                                            <streetnumber>34</streetnumber>
                                                            <city>Zurich</city>
                                                            <zipcode>3000</zipcode>
                                                            <country>CH</country>
                                                            <language>de</language>
                                                        </patient>
                                                    </response>
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>false</success>
                                                        <errors>
                                                            <error>
                                                                <code>mrnExists</code>
                                                                <message>M.R.N.: this number already exists in the database</message>
                                                            </error>
                                                        </errors>
                                                    </response>
                                                

5.2 Delete a patient

Description

Deletes a registered patient.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients/{mrn}?token={token-id}

URI Parameters

dept-id
department ID
{mrn}
patient mrn
{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

DELETE

Resource Formats

Authentication

required

Request Entities

n/a

Responses

200 OK
Operation success information is returned as the response entity.
404 Not Found
There is no patient with this patient MRN.

Response Entities

Format: application/json
                                                
                                                    {
                                                       "success": "true"
                                                    }
                                                
Format: application/json
                                                
                                                         {
                                                          "success": false,
                                                          "errors": [
                                                                {
                                                                  "code": "PatientNotFound",
                                                                  "message": "Patient not found"
                                                                }
                                                          ]
                                                        }
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>true</success>
                                                    </response>
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>false</success>
                                                        <errors>
                                                            <error>
                                                                <code>PatientNotFound</code>
                                                                <message>Patient not found</message>
                                                            </error>
                                                        </errors>
                                                    </response>
                                                

5.3 Get patient details

Description

Returns information about a registered patient.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients/{mrn}?token={token-id}

URI Parameters

dept-id
department ID
{mrn}
patient mrn
{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

GET

Resource Formats

Authentication

required

Request Entities

n/a

Responses

200 OK
The data set is returned as the response entity.
404 Not Found
There is no patient with this patient MRN.

Response Entities

Format: application/json
                                                    
                                                        {
                                                         "success": true,
                                                         "patient": {
                                                            "href": "https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver",
                                                            "patientid": 128531,
                                                            "departmentid": 1,
                                                            "mrn": "restserver",
                                                            "dob": "03.04.1998",
                                                            "gender": "m",
                                                            "lastname": "",
                                                            "firstname": "",
                                                            "familynameatbirth": "",
                                                            "countryofbirth": "",
                                                            "cityofbirth": "",
                                                            "phone": "",
                                                            "email": "",
                                                            "streetname": "",
                                                            "streetnumber": "",
                                                            "city": "",
                                                            "zipcode": ""
                                                         }
                                                       }
                                                    
Format: application/json
                                                    
                                                        {
                                                         "success": false,
                                                         "errors": [
                                                            {
                                                              "code": "PatientNotFound",
                                                              "message": "Patient not found"
                                                            }
                                                         ]
                                                       }
                                                    
Format: application/xml
                                                    
                                                        <response>
                                                            <success>true</success>
                                                            <patient>
                                                                <href>https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver</href>
                                                                <patientid>128531</patientid>
                                                                <departmentid>1</departmentid>
                                                                <mrn>restserver</mrn>
                                                                <dob>03.04.1998</dob>
                                                                <gender>m</gender>
                                                                <lastname></lastname>
                                                                <firstname></firstname>
                                                                <familynameatbirth></familynameatbirth>
                                                                <countryofbirth></countryofbirth>
                                                                <cityofbirth></cityofbirth>
                                                                <phone></phone>
                                                                <email></email>
                                                                <streetname></streetname>
                                                                <streetnumber></streetnumber>
                                                                <city></city>
                                                                <zipcode></zipcode>
                                                            </patient>
                                                        </response>
                                                    
Format: application/xml
                                                    
                                                        <response>
                                                            <success>false</success>
                                                            <errors>
                                                                <error>
                                                                    <code>PatientNotFound</code>
                                                                    <message>Patient not found</message>
                                                                </error>
                                                            </errors>
                                                        </response>
                                                    

5.4 Update a patient

Description

Updates a patient.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patients/{mrn}?token={token-id}

URI Parameters

dept-id
department ID
{mrn}
patient mrn
{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

PUT

Resource Formats

Authentication

required

Request Entities

Format: application/json
                                                
                                                    {
                                                        "dob": "01.01.1998",
                                                        "gender": "f",
                                                        "lastname": "WebService",
                                                        "firstname": "tango",
                                                        "familynameatbirth": "Test",
                                                        "countryofbirth": "DE",
                                                        "cityofbirth": "Milan",
                                                        "phone": "123123",
                                                        "email": "test@gmail.xpt",
                                                        "streetname": "Strass",
                                                        "streetnumber": "34",
                                                        "city": "Zurich",
                                                        "zipcode": "3000",
                                                        "country": "CH",
                                                        "language": "de"
                                                    }
                                                
Format: application/xml
                                                
                                                    <patient>
                                                        <dob>01.01.1998</dob>
                                                        <gender>f</gender>
                                                        <lastname>WebService</lastname>
                                                        <firstname>tango</firstname>
                                                        <familynameatbirth>Test</familynameatbirth>
                                                        <countryofbirth>DE</countryofbirth>
                                                        <cityofbirth>Milan</cityofbirth>
                                                        <phone>123123</phone>
                                                        <email>test@gmail.xpt</email>
                                                        <streetname>Strass</streetname>
                                                        <streetnumber>34</streetnumber>
                                                        <city>Zurich</city>
                                                        <zipcode>3000</zipcode>
                                                        <country>CH</country>
                                                        <language>de</language>
                                                    </patient>
                                                

Responses

201 Created
The data set is returned as the response entity.
200 OK
Operation success information is returned as the response entity (e.g MRN already exists).

Response Entities

Format: application/json
                                                
                                                    {
                                                        "success": true,
                                                        "patient": {
                                                          "href": "https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver1",
                                                          "patientid": 128538,
                                                          "departmentid": 1,
                                                          "mrn": "restserver1",
                                                          "dob": "01.01.1998",
                                                          "gender": "f",
                                                          "lastname": "WebService",
                                                          "firstname": "tango",
                                                          "familynameatbirth": "Test",
                                                          "countryofbirth": "DE",
                                                          "cityofbirth": "Milan",
                                                          "phone": "123123",
                                                          "email": "test@gmail.xpt",
                                                          "streetname": "Strass",
                                                          "streetnumber": "34",
                                                          "city": "Zurich",
                                                          "zipcode": "3000",
                                                          "country": "CH",
                                                          "language": "de"
                                                        }
                                                    }
                                                
Format: application/json
                                                
                                                    {
                                                        "success": false,
                                                        "errors": [
                                                            {
                                                              "code": "PatientNotFound",
                                                              "message": "Patient not found"
                                                            }
                                                        ]
                                                   }
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>true</success>
                                                        <patient>
                                                            <href>https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver1</href>
                                                            <patientid>128537</patientid>
                                                            <departmentid>1</departmentid>
                                                            <mrn>restserver1</mrn>
                                                            <dob>01.01.1998</dob>
                                                            <gender>f</gender>
                                                            <lastname>WebService</lastname>
                                                            <firstname>tango</firstname>
                                                            <familynameatbirth>Test</familynameatbirth>
                                                            <countryofbirth>DE</countryofbirth>
                                                            <cityofbirth>Milan</cityofbirth>
                                                            <phone>123123</phone>
                                                            <email>test@gmail.xpt</email>
                                                            <streetname>Strass</streetname>
                                                            <streetnumber>34</streetnumber>
                                                            <city>Zurich</city>
                                                            <zipcode>3000</zipcode>
                                                            <country>CH</country>
                                                            <language>de</language>
                                                        </patient>
                                                    </response>
                                                
Format: application/xml
                                                
                                                    <response>
                                                        <success>false</success>
                                                        <errors>
                                                            <error>
                                                                <code>PatientNotFound</code>
                                                                <message>Patient not found</message>
                                                            </error>
                                                        </errors>
                                                    </response>
                                                

6. Patientform

Description

This resource represents a patient and form.

Resource URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patientform
dept-id
department ID

6.1 Create a patient with forms.

Description

Creates a patient.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patientform?token={token-id}

URI Parameters

dept-id
department ID
{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

POST

Resource Formats

Authentication

required

Request Entities

Format: application/json
							
								{
									"mrn": "restserver1",
									"dob": "01.01.1998",
									"gender": "f",
									"lastname": "WebService",
									"firstname": "tango",
									"familynameatbirth": "Test",
									"countryofbirth": "DE",
									"cityofbirth": "Milan",
									"phone": "123123",
									"email": "test@gmail.xpt",
									"streetname": "Strass",
									"streetnumber": "34",
									"city": "Zurich",
									"zipcode": "3000",
									"country": "CH",
									"language": "de",
									"forms": [
										{
											"name": "SWISSNOSO_SSI_PRIM",
											"formcreatedby": "V6",
											"formcreatedby": "1"
										}
									]
								}
							
Format: application/xml
							
								<patient>
									<mrn>restserver1</mrn>
									<dob>01.01.1998</dob>
									<gender>f</gender>
									<lastname>WebService</lastname>
									<firstname>tango</firstname>
									<familynameatbirth>Test</familynameatbirth>
									<countryofbirth>DE</countryofbirth>
									<cityofbirth>Milan</cityofbirth>
									<phone>123123</phone>
									<email>test@gmail.xpt</email>
									<streetname>Strass</streetname>
									<streetnumber>34</streetnumber>
									<city>Zurich</city>
									<zipcode>3000</zipcode>
									<country>CH</country>
									<language>de</language>
									<forms>
										<form>
											<name>SWISSNOSO_SSI_PRIM</name>
											<version>V6</version>
											<formcreatedby>1</formcreatedby>
										</form>
									</forms>
								</patient>
							

Responses

201 Created
The data set is returned as the response entity.
200 OK
Operation success information is returned as the response entity (e.g MRN already exists).

Response Entities

Format: application/json
							
								{
									"success": true,
									"patient": {
									  "href": "https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver1",
									  "patientid": 128538,
									  "departmentid": 1,
									  "mrn": "restserver1",
									  "dob": "01.01.1998",
									  "gender": "f",
									  "lastname": "WebService",
									  "firstname": "tango",
									  "familynameatbirth": "Test",
									  "countryofbirth": "DE",
									  "cityofbirth": "Milan",
									  "phone": "123123",
									  "email": "test@gmail.xpt",
									  "streetname": "Strass",
									  "streetnumber": "34",
									  "city": "Zurich",
									  "zipcode": "3000",
									  "country": "CH",
									  "language": "de",
									  "forms": [
										{	
											"formdataid":89853,
											"name":"SWISSNOSO_SSI_PRIM",
											"memodcurl": "https://memdocdemo.memdoc.org/redirect.jsf?context=2e5f7992b317ba9de4b0e99419b84d62f69931f335",
											"caseid": "100_4677_1"
										}
									]
									}
								}
							
Format: application/json
							
									 {
										"success": false,
										"errors": [
										  {
											"code": "mrnExists",
											"message": "M.R.N.: this number already exists in the database"
										  }
										]
									 }
							
Format: application/xml
							
								<response>
									<success>true</success>
									<patient>
										<href>https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver1</href>
										<patientid>128537</patientid>
										<departmentid>1</departmentid>
										<mrn>restserver1</mrn>
										<dob>01.01.1998</dob>
										<gender>f</gender>
										<lastname>WebService</lastname>
										<firstname>tango</firstname>
										<familynameatbirth>Test</familynameatbirth>
										<countryofbirth>DE</countryofbirth>
										<cityofbirth>Milan</cityofbirth>
										<phone>123123</phone>
										<email>test@gmail.xpt</email>
										<streetname>Strass</streetname>
										<streetnumber>34</streetnumber>
										<city>Zurich</city>
										<zipcode>3000</zipcode>
										<country>CH</country>
										<language>de</language>
										<forms>
										<form>
											<formdataid>89853</formdataid>
											<memodcurl>https://memdocdemo.memdoc.org/redirect.jsf?context=2e5f7992b317ba9de4b0e99419b84d62f69931f335</memodcurl>
											<name>SWISSNOSO_SSI_PRIM</name>
											<caseid>100_4677_1</caseid>
										</form>
									</forms>
									</patient>
								</response>
							
Format: application/xml
							
								<response>
									<success>false</success>
									<errors>
										<error>
											<code>mrnExists</code>
											<message>M.R.N.: this number already exists in the database</message>
										</error>
									</errors>
								</response>
							

6.2 Get patient details and a specific form access

Description

Returns information about a registered patient and memdoc url to the specific form (if it exists).

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patientform/{mrn}/forms/{formuserid}?token={token-id}

URI Parameters

dept-id
department ID
{mrn}
patient mrn
{formuserid}
formuser Id
{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

GET

Resource Formats

Authentication

required

Request Entities

n/a

Responses

200 OK
The data set is returned as the response entity.
404 Not Found
There is no patient with this patient MRN.

Response Entities

Format: application/json
							
								{
								 "success": true,
								 "patient": {
									"href": "https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver",
									"patientid": 128531,
									"departmentid": 1,
									"mrn": "restserver",
									"dob": "03.04.1998",
									"gender": "m",
									"lastname": "",
									"firstname": "",
									"familynameatbirth": "",
									"countryofbirth": "",
									"cityofbirth": "",
									"phone": "",
									"email": "",
									"streetname": "",
									"streetnumber": "",
									"city": "",
									"zipcode": "",
									"forms": [
										{
											"formdataid": 89853,
											"memodcurl": "https://memdocdemo.memdoc.org/redirect.jsf?context=f83f26a2d6e21824f94e143532afc6b3c3e256245",
											"name": "SWISSNOSO_SSI_PRIM",
											"caseid": "100_4677_1"
										}
									]
								 }
							   }
							
Format: application/json
							
								{
								 "success": false,
								 "errors": [
									{
									  "code": "PatientNotFound",
									  "message": "Patient not found"
									}
								 ]
							   }
							
Format: application/xml
								
									<response>
										<success>true</success>
										<patient>
											<href>https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver</href>
											<patientid>128531</patientid>
											<departmentid>1</departmentid>
											<mrn>restserver</mrn>
											<dob>03.04.1998</dob>
											<gender>m</gender>
											<lastname></lastname>
											<firstname></firstname>
											<familynameatbirth></familynameatbirth>
											<countryofbirth></countryofbirth>
											<cityofbirth></cityofbirth>
											<phone></phone>
											<email></email>
											<streetname></streetname>
											<streetnumber></streetnumber>
											<city></city>
											<zipcode></zipcode>
											<forms>
												<form>
													<formdataid>89853</formdataid>
													<memodcurl>https://memdocdemo.memdoc.org/redirect.jsf?context=2e5f7992b317ba9de4b0e99419b84d62f69931f335</memodcurl>
													<name>SWISSNOSO_SSI_PRIM</name>
													<caseid>100_4677_1</caseid>
												</form>
											</forms>
										</patient>
									</response>
								
Format: application/xml
								
									<response>
										<success>false</success>
										<errors>
											<error>
												<code>PatientNotFound</code>
												<message>Patient not found</message>
											</error>
										</errors>
									</response>
								

6.3 Get patient details and form urls

Description

Returns information about a registered patient and memdoc urls to all forms.

URI

https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/{dept-id}/patientform/{mrn}?token={token-id}

URI Parameters

dept-id
department ID
{mrn}
patient mrn
{token-id}
token id, e.g 231464572-1402851376-2-101-en

HTTP Method

GET

Resource Formats

Authentication

required

Request Entities

n/a

Responses

200 OK
The data set is returned as the response entity.
404 Not Found
There is no patient with this patient MRN.

Response Entities

Format: application/json
							
								{
								 "success": true,
								 "patient": {
									"href": "https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver",
									"patientid": 128531,
									"departmentid": 1,
									"mrn": "restserver",
									"dob": "03.04.1998",
									"gender": "m",
									"lastname": "",
									"firstname": "",
									"familynameatbirth": "",
									"countryofbirth": "",
									"cityofbirth": "",
									"phone": "",
									"email": "",
									"streetname": "",
									"streetnumber": "",
									"city": "",
									"zipcode": "",
									"forms": [
										{
											"formdataid": 89853,
											"memodcurl": "https://memdocdemo.memdoc.org/redirect.jsf?context=f83f26a2d6e21824f94e143532afc6b3c3e256245",
											"name": "SWISSNOSO_SSI_PRIM",
											"caseid": "100_4677_1"
										}
									]
								 }
							   }
							
Format: application/json
							
								{
								 "success": false,
								 "errors": [
									{
									  "code": "PatientNotFound",
									  "message": "Patient not found"
									}
								 ]
							   }
							
Format: application/xml
								
									<response>
										<success>true</success>
										<patient>
											<href>https://memdocdemo.memdoc.org/memdocRestServer/rest/demo/depts/1/patients/restserver</href>
											<patientid>128531</patientid>
											<departmentid>1</departmentid>
											<mrn>restserver</mrn>
											<dob>03.04.1998</dob>
											<gender>m</gender>
											<lastname></lastname>
											<firstname></firstname>
											<familynameatbirth></familynameatbirth>
											<countryofbirth></countryofbirth>
											<cityofbirth></cityofbirth>
											<phone></phone>
											<email></email>
											<streetname></streetname>
											<streetnumber></streetnumber>
											<city></city>
											<zipcode></zipcode>
											<forms>
												<form>
													<formdataid>89853</formdataid>
													<memodcurl>https://memdocdemo.memdoc.org/redirect.jsf?context=2e5f7992b317ba9de4b0e99419b84d62f69931f335</memodcurl>
													<name>SWISSNOSO_SSI_PRIM</name>
													<caseid>100_4677_1</caseid>
												</form>
											</forms>
										</patient>
									</response>
								
Format: application/xml
								
									<response>
										<success>false</success>
										<errors>
											<error>
												<code>PatientNotFound</code>
												<message>Patient not found</message>
											</error>
										</errors>
									</response>