{ "resource":{ "resourceType": "Encounter", "id":"{{ID}}", "class": { {{>DataType/CWECoding.hbs mapping="CodeSystem/EncounterClass.hbs" CWE=PV1-2}}, }, {{#if PV1-45}} "status":"finished", {{else}} "status":"unknown", {{/if}} "location": [ { {{#if (ne PV1-2-1 "P")}}, "status":"active", {{/if}}, {{#if (eq PV1-2-1 "P")}}, "status":"planned", {{/if}}, {{#if PV1-3}}, "location": { "reference": "Location/{{generateUUID PV1-3}}", } {{/if}} }, { {{#if PV1-6}}, "status":"completed", "location": { "reference": "Location/{{generateUUID PV1-6}}", } {{/if}} }, ], "type": [ { {{>DataType/CWECodeableConcept.hbs mapping="CodeSystem/AdmissionType.hbs" CWE=PV1-4}} }, ], "hospitalization": { "preAdmissionIdentifier": { {{>DataType/CX.hbs CX=PV1-5}}, }, "reAdmission": { {{>DataType/CWECodeableConcept.hbs mapping="CodeSystem/ReadmissionIndicator.hbs" CWE=PV1-13}}, }, "admitSource": { {{>DataType/CWECodeableConcept.hbs CWE=PV1-14}}, }, "dischargeDisposition": { {{>DataType/CWECodeableConcept.hbs CWE=PV1-36}}, }, "dietPreference": [ { {{>DataType/CWECodeableConcept.hbs CWE=PV1-38}} }, ], }, "participant": [ { "type": [ { "coding": [ { {{#if PV1-7}}, "code":"ATND", {{/if}}, {{#if PV2-13}}, "code":"REF", {{/if}}, {{#if PV1-7}}, "system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType", {{/if}}, {{#if PV2-13}}, "system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType", {{/if}}, {{#if PV1-7}}, "display":"attender", {{/if}}, }, ], {{#if PV2-13}}, "text":"referrer", {{/if}}, }, ], }, { "type": [ { "coding": [ { {{#if PV1-8}}, "code":"REF", {{/if}}, {{#if PV1-8}}, "system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType", {{/if}}, }, ], {{#if PV1-8}}, "text":"referrer", {{/if}}, }, ], }, { "type": [ { "coding": [ { {{#if PV1-9}}, "code":"CON", {{/if}}, {{#if PV1-9}}, "system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType", {{/if}}, }, ], {{#if PV1-9}}, "text":"consultant", {{/if}}, }, ], }, { "type": [ { "coding": [ { {{#if PV1-17}}, "code":"ADM", {{/if}}, {{#if PV1-17}}, "system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType", {{/if}}, }, ], {{#if PV1-17}}, "text":"admitter", {{/if}}, }, ], }, { "type": [ { "coding": [ { {{#if PV1-52}}, "code":"PART", {{/if}}, {{#if PV1-52}}, "system":"http://terminology.hl7.org/CodeSystem/v3-ParticipationType", {{/if}}, }, ], {{#if PV1-52}}, "text":"Participation", {{/if}}, }, ], }, ], "serviceType": { {{>DataType/CWECodeableConcept.hbs CWE=PV1-10}}, }, "identifier": [ { {{>DataType/CX.hbs CX=PV1-19}}, "type": { "coding": [ { {{#if PV1-19}}, "system":"http://terminology.hl7.org/CodeSystem/v2-0203", {{/if}}, }, ], {{#if PV1-19}}, "text":"visit number", {{/if}}, }, }, { {{>DataType/CX.hbs CX=PV1-50}}, }, ], "period": { "start":"{{formatAsDateTime PV1-44}}", "end":"{{formatAsDateTime PV1-45}}", }, "reasonCode": [ { {{>DataType/CWECodeableConcept.hbs CWE=PV2-3}} }, ], "length": { "value":"{{PV2-11}}", {{#if PV2-11}}, "unit":"d", {{/if}}, {{#if PV2-11}}, "system":"http://unitsofmeasure.org/", {{/if}}, }, "text": { "div":"{{PV2-12}}", }, "priority": { {{>DataType/CWECodeableConcept.hbs mapping="CodeSystem/EncounterPriority.hbs" CWE=PV2-25}}, }, }, "request":{ "method":"PUT", "url":"Encounter/{{ID}}", }, },