Table of Contents | ||
---|---|---|
|
...
Select the last Composition sorted by Composition.date from ME DB filtered by Composition.subject=patient_id or Composition.subject=merge_person_id (all merged person of this patient_id), Composition.type= DRIVERS, Composition.status= final
in case nothing found return fault with faultCode=”Server”, faultString = “Composition not found”
Create a response according to schema below, populate event array with values from the Composition.event array:
if
event
array contains onlyDRIVERS_GROUP2_ADMIT
($.composition.event[?(@.code.coding[].code=="DRIVERS_GROUP2_ADMIT")]):create an element in getDriversAccessStatusResponse.event
getDriversAccessStatusResponse.event.code= Composition.event.code.coding.code
getDriversAccessStatusResponse.event.period =Composition.event.period
add additional element to
event
array with following valuesgetDriversAccessStatusResponse.event.code= DRIVERS_GROUP1_ADMIT
getDriversAccessStatusResponse.event.period =$.composition.event[?(@.code=="DRIVERS_GROUP2_ADMIT")].period
else if `event` array contains only
DRIVERS_GROUP1_DENY
($.composition.event[?(@.code.coding[].code=="DRIVERS_GROUP1_DENY")]):create an element in getDriversAccessStatusResponse.event
getDriversAccessStatusResponse.event.code= Composition.event.code.coding.code
getDriversAccessStatusResponse.event.period =Composition.event.period
add additional element to
event
array in response with following valuesgetDriversAccessStatusResponse.event.code= DRIVERS_GROUP2_DENY
getDriversAccessStatusResponse.event.period =$.composition.event[?(@.code=="DRIVERS_GROUP1_DENY")].period
else if `event` array contains
DRIVERS_GROUP1_ADMIT
or combination[ DRIVERS_GROUP1_ADMIT, DRIVERS_GROUP2_DENY ],
or combination[ DRIVERS_GROUP1_DENY, DRIVERS_GROUP2_DENY ]
for each element in Composition.event array create an element in getDriversAccessStatusResponse.event
getDriversAccessStatusResponse.event.code= Composition.event.code.coding.code
getDriversAccessStatusResponse.event.period =Composition.event.period
else return faultCode=”Server”, faultString = “Could not define access status”
populate additionalAdmissionCondition array for each Composition.extension item:
additionalAdmissionCondition.code = Composition.extension[@].valueCodeableConcept.coding[].code
if Composition.extension[@].valueCodeableConcept.extension is not null:
additionalAdmissionCondition.alphabeticalValue[]= Composition.extension[@].valueCodeableConcept.extension[?(@.valueCodeableConcept)].valueCodeableConcept.coding.code
additionalAdmissionCondition.numericalValue=Composition.extension[@].valueCodeableConcept.extension[?(@.valueDecimal)].valueDecimal
Return response to the client
...
Key | Hierarchy level | Type | Description | Cardinality | |
---|---|---|---|---|---|
1 | getDriversAccessStatusResponse | 1 | object |
| 0..1 |
2 | event | 2 | array | Event array | 1..* |
3 | code | 3 | string | Code display value from event array | 1..1 |
4 | period | 3 | object | Period from event array | 1..1 |
5 | start | 4 | dateTime | Start of period (ISO8601 format) | 1..1 |
6 | end | 4 | dateTime | End of period (ISO8601 format) | 0..1 |
7 | additionAdmissionCondition | 2 | array | Addition admission condition | 0..* |
8 | code | 3 | string | Code display value from addition admission condition array | 1..1 |
9 | codeNumber | 3 | string | Code from addition admission condition array | 1..1 |
10 | alphabeticalValue | 3 | array | Alphabetical value from addition admission condition array | 0..* |
11 | numericalValue | 3 | decimal | Numerical value from addition admission condition array | 0..1 |
12 | fault | 1 | object |
| 0..1 |
13 | faultCode | 2 | string | Standard code that provides more information about the fault. A set of code values is predefined by the SOAP specification, as defined below:
| 1..1 |
14 | faultString | 2 | string | A human readable explanation of the fault | 1..1 |
...