From 9850952add57b9ae097422e1f9d1f9af3a16ef25 Mon Sep 17 00:00:00 2001 From: Surya M Date: Mon, 10 Apr 2023 01:49:24 +0530 Subject: [PATCH 1/6] updated observation create and update --- .../r4/clinical/diagnostics/observation.md | 32 +- .../example_json/r4_examples_observation.rb | 773 +++++++++++++----- lib/resources/r4/observation.yaml | 164 +++- 3 files changed, 765 insertions(+), 204 deletions(-) diff --git a/content/millennium/r4/clinical/diagnostics/observation.md b/content/millennium/r4/clinical/diagnostics/observation.md index 197ccc205..40ea42cca 100644 --- a/content/millennium/r4/clinical/diagnostics/observation.md +++ b/content/millennium/r4/clinical/diagnostics/observation.md @@ -237,10 +237,11 @@ Create a new Observation. _Implementation Notes_ * See [Understand Supported Vital Signs in the FHIR Observation Resource](https://wiki.cerner.com/pages/releaseview.action?spaceKey=reference&title=Understand%20Supported%20Vital%20Signs%20in%20the%20FHIR%20Observation%20Resource) for a list of vital signs that are supported for the create operation. -* Components are not currently supported when writing Blood Pressures. +* Components are supported only when writing Observation Blood Pressure and Pulse Oximetry Profiles. * Individual systolic and diastolic components will be paired upon subsequent search or read as long as the blood pressures are paired in Millennium. See [Configure Blood Pressure Event Set Pairing Hierarchy]. * Only the body fields mentioned below are supported. Unsupported fields will be ignored. +* Also supports creating observation with proprietary codes. * Modifier fields should not be provided, and will cause the transaction to fail. * Also supports creating observation with proprietary codes with the latest version of observation. @@ -270,6 +271,14 @@ _Note_: <%= json(:R4_OBSERVATION_CREATE) %> +#### Vitals - Blood Pressure Body Example + +<%= json(:R4_OBSERVATION_BP_CREATE) %> + +#### Vitals - Pulse Oximetry Body Example + +<%= json(:R4_OBSERVATION_PO_CREATE) %> + #### Labs Body Example <%= json(:R4_OBSERVATION_LABS_CREATE) %> @@ -308,6 +317,7 @@ _Implementation Notes_ * Currently only `laboratory` and `vital-signs` are supported. * Both read and write scopes are required. * Updates on patient and category are not supported. +* Components are only supported for vital-sign blood pressure and pulse oximetry profiles * See [FHIR® Update] for additional details about update operations. ### Authorization Types @@ -336,10 +346,30 @@ _Note_: <%= json(:R4_OBSERVATION_LABS_UPDATE) %> +#### Request + + PUT https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/VS-197356031 + #### Vitals Body Example <%= json(:R4_OBSERVATION_VITALS_UPDATE) %> +#### Request + + PUT https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/BP-59857018-59857020 + +#### Vitals - Blood Pressure Body Example + +<%= json(:R4_OBSERVATION_VITALS_BP_UPDATE) %> + +#### Request + + PUT https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/VS-CV-78693473-SECT-8098 + +#### Vitals - Pulse Oximetry Body Example + +<%= json(:R4_OBSERVATION_VITALS_PO_UPDATE) %> + #### Response <%= headers status: 200 %> diff --git a/lib/resources/example_json/r4_examples_observation.rb b/lib/resources/example_json/r4_examples_observation.rb index 62c337b71..a067f4349 100644 --- a/lib/resources/example_json/r4_examples_observation.rb +++ b/lib/resources/example_json/r4_examples_observation.rb @@ -806,6 +806,254 @@ module Resources ] }.freeze + R4_OBSERVATION_BP_CREATE ||= { + "resourceType": 'Observation', + "status": 'final', + "category": [ + { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/observation-category', + "code": 'vital-signs', + "display": 'Vital Signs' + } + ], + "text": 'Vital Signs' + } + ], + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '85354-9' + } + ], + "text": 'Blood pressure' + }, + "subject": { + "reference": 'Patient/12457981' + }, + "encounter": { + "reference": 'Encounter/97845408' + }, + "effectiveDateTime": '2022-06-04T08:00:38.000Z', + "issued": '2022-06-04T08:00:38Z', + "component": [ + { + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '8480-6' + } + ], + "text": 'Systolic Blood Pressure Invasive' + }, + "valueQuantity": { + "value": 120, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "interpretation": [ + { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation', + "code": 'N' + } + ] + } + ], + "referenceRange": [ + { + "low": { + "value": 45.0, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "high": { + "value": 75.0, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "type": { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/referencerange-meaning', + "code": 'normal' + } + ], + "text": 'Normal Range' + } + } + ] + }, + { + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '8462-4' + } + ], + "text": 'Diastolic Blood Pressure Invasive' + }, + "valueQuantity": { + "value": 80, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "interpretation": [ + { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation', + "code": 'N' + } + ] + } + ], + "referenceRange": [ + { + "low": { + "value": 35.8, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "high": { + "value": 37.3, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "type": { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/referencerange-meaning', + "code": 'normal' + } + ], + "text": 'Normal Range' + } + } + ] + } + ] + }.freeze + + R4_OBSERVATION_PO_CREATE ||= { + "resourceType": 'Observation', + "status": 'final', + "category": [ + { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/observation-category', + "code": 'vital-signs', + "display": 'Vital Signs' + } + ], + "text": 'Vital Signs' + } + ], + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '59408-5' + } + ], + "text": 'SpO2' + }, + "subject": { + "reference": 'Patient/12457981' + }, + "encounter": { + "reference": 'Encounter/97845408' + }, + "effectiveDateTime": '2022-06-05T08:00:38.004Z', + "issued": '2022-06-05T08:00:34Z', + "performer": [ + { + "extension": [ + { + "valueCodeableConcept": { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', + "code": 'LA', + "display": 'legal authenticator' + } + ], + "text": 'legal authenticator' + }, + "url": 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' + } + ], + "reference": 'Practitioner/15441459' + } + ], + "component": [ + { + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '3151-8', + "display": 'Inhaled oxygen flow rate' + } + ], + "text": 'Oxygen Flow Rate' + }, + "valueQuantity": { + "value": 7, + "unit": 'L/min', + "system": 'http://unitsofmeasure.org', + "code": 'L/min' + } + }, + { + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '3150-0' + } + ], + "text": 'FIO2' + }, + "valueQuantity": { + "value": 21, + "unit": '%', + "system": 'http://unitsofmeasure.org', + "code": '%' + } + }, + { + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '59408-5' + } + ], + "text": 'SpO2' + }, + "valueQuantity": { + "value": 96, + "unit": '%', + "system": 'http://unitsofmeasure.org', + "code": '%' + } + } + ] + }.freeze + R4_OBSERVATION_LABS_CREATE ||= { "resourceType": 'Observation', "status": 'final', @@ -1046,238 +1294,363 @@ module Resources } }.freeze - R4_OBSERVATION_REVINCLUDE_BUNDLE ||= { - 'resourceType': 'Bundle', - 'id': '79c71e5b-2793-4ace-bc5e-190e38784e80', - 'type': 'searchset', - 'link': [ + R4_OBSERVATION_VITALS_BP_UPDATE ||= { + "resourceType": 'Observation', + "id": 'BP-59857018-59857020', + "identifier": [ { - 'relation': 'self', - 'url': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation?Observation?patient=12457977&category=vital-signs&_revinclude=Provenance%3Atarget' + "system": 'https://fhir.cerner.com/ceuuid', + "value": 'CEfda49233-ccfa-4ed4-afbc-9f5082c2bf0c-59857018-2022111805415000' + }, + { + "system": 'https://fhir.cerner.com/ceuuid', + "value": 'CEfda49233-ccfa-4ed4-afbc-9f5082c2bf0c-59857020-2022111805415000' } ], - 'entry': [ + "status": 'corrected', + "category": [ { - 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/VS-196190669', - 'resource': { - 'resourceType': 'Observation', - 'id': 'VS-196190669', - 'meta': { - 'versionId': '2', - 'lastUpdated': '2017-02-25T02:41:03.000Z' - }, - 'text': { - 'status': 'generated', - 'div': '

Observation

Patient Id:12457977'\ - '

Status: Entered in Error

Categories: Vital Signs

Code'\ - ': Temperature Temporal Artery

Result: 39 degC

Interpretation'\ - ': Normal

Effective Date: Feb 24, 2017 8:37 P.M. CST

'\ - '

Reference Range: 36-38 degC

' - }, - 'identifier': [ + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/observation-category', + "code": 'vital-signs', + "display": 'Vital Signs' + } + ], + "text": 'Vital Signs' + } + ], + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '85354-9', + "display": 'Blood pressure panel with all children optional' + } + ], + "text": 'Blood pressure' + }, + "subject": { + "reference": 'Patient/15116458' + }, + "encounter": { + "reference": 'Encounter/15687784' + }, + "effectiveDateTime": '2022-06-09T08:00:58.000Z', + "issued": '2022-06-09T08:00:58.000Z', + "performer": [ + { + "extension": [ + { + "valueCodeableConcept": { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', + "code": 'LA', + "display": 'legal authenticator' + } + ], + "text": 'legal authenticator' + }, + "url": 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' + } + ], + "reference": 'Practitioner/15441459' + } + ], + "component": [ + { + "code": { + "coding": [ { - 'system': 'https://fhir.cerner.com/ceuuid', - 'value': 'CE87caf4b7-9397-4667-9897-702218017c9e-196190669-2017022502373000' + "system": 'http://loinc.org', + "code": '8480-6' } ], - 'status': 'entered-in-error', - 'category': [ - { - 'coding': [ + "text": 'Systolic Blood Pressure Sitting' + }, + "valueQuantity": { + "value": 99, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "interpretation": [ + { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation', + "code": 'N', + "display": 'Normal' + } + ] + } + ], + "referenceRange": [ + { + "low": { + "value": 35, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "high": { + "value": 37, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "type": { + "coding": [ { - 'system': 'http://terminology.hl7.org/CodeSystem/observation-category', - 'code': 'vital-signs', - 'display': 'Vital Signs' + "system": 'http://terminology.hl7.org/CodeSystem/referencerange-meaning', + "code": 'normal', + "display": 'Normal Range' } ], - 'text': 'Vital Signs' + "text": 'Normal Range' + } + } + ] + }, + { + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '8462-4' } ], - 'code': { - 'coding': [ - { - 'system': 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72', - 'code': '4157752', - 'display': 'Temperature Temporal Artery', - 'userSelected': true - }, - { - 'system': 'http://loinc.org', - 'code': '75539-7', - 'display': 'Body temperature - Temporal artery' - }, + "text": 'Diastolic Blood Pressure Sitting' + }, + "valueQuantity": { + "value": 66, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "interpretation": [ + { + "coding": [ { - 'system': 'http://loinc.org', - 'code': '8310-5', - 'display': 'Body temperature' + "system": 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation', + "code": 'N', + "display": 'Normal' } - ], - 'text': 'Temperature Temporal Artery' - }, - 'subject': { - 'reference': 'Patient/12457977' - }, - 'encounter': { - 'reference': 'Encounter/97697398' - }, - 'effectiveDateTime': '2017-02-25T02:37:00.000Z', - 'issued': '2017-02-25T02:41:03.000Z', - 'performer': [ - { - 'extension': [ - { - 'valueCodeableConcept': { - 'coding': [ - { - 'system': 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', - 'code': 'LA', - 'display': 'legal authenticator' - } - ], - 'text': 'legal authenticator' - }, - 'url': 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' - }, + ] + } + ], + "referenceRange": [ + { + "low": { + "value": 35, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "high": { + "value": 37, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "type": { + "coding": [ { - 'valueCodeableConcept': { - 'coding': [ - { - 'system': 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', - 'code': 'PPRF', - 'display': 'primary performer' - } - ], - 'text': 'primary performer' - }, - 'url': 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' + "system": 'http://terminology.hl7.org/CodeSystem/referencerange-meaning', + "code": 'normal', + "display": 'Normal Range' } ], - 'reference': 'Practitioner/11638346' + "text": 'Normal Range' } - ], - 'valueQuantity': { - 'value': 39, - 'unit': 'degC', - 'system': 'http://unitsofmeasure.org', - 'code': 'Cel' - }, - 'interpretation': [ - { - 'coding': [ + } + ] + } + ] + }.freeze + + R4_OBSERVATION_VITALS_PO_UPDATE ||= { + "resourceType": 'Observation', + "id": 'VS-197356031', + "identifier": [ + { + "system": 'https://fhir.cerner.com/ceuuid', + "value": 'CE87caf4b7-9397-4667-9897-702218017c9e-197356031-2021061619245900' + } + ], + "status": 'corrected', + "category": [ + { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/observation-category', + "code": 'vital-signs', + "display": 'Vital Signs' + } + ], + "text": 'Vital Signs' + } + ], + "code": { + "coding": [ + { + "system": 'https://fhir.cerner.com/d242a518-4074-4bd4-a3a6-adfe0c5c1c51/codeSet/72', + "code": '703558', + "display": 'Temperature Oral', + "userSelected": true + } + ], + "text": 'Temperature Oral' + }, + "subject": { + "reference": 'Patient/12457979' + }, + "encounter": { + "reference": 'Encounter/97787491' + }, + "effectiveDateTime": '2020-07-04T07:15:00.000Z', + "issued": '2021-05-06T20:07:14.000Z', + "performer": [ + { + "extension": [ + { + "valueCodeableConcept": { + "coding": [ { - 'system': 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/52', - 'code': '214', - 'userSelected': true - }, + "system": 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', + "code": 'LA', + "display": 'legal authenticator' + } + ], + "text": 'legal authenticator' + }, + "url": 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' + } + ], + "reference": 'Practitioner/1' + } + ], + "valueQuantity": { + "value": 123, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + } + }.freeze + + R4_OBSERVATION_REVINCLUDE_BUNDLE ||= { + "resourceType": 'Observation', + "id": 'VS-CV-78693473-SECT-8098', + "meta": { + "versionId": '0', + "lastUpdated": '2022-11-26T15:53:45Z' + }, + "text": { + "status": 'generated', + "div": '

Observation

Patient Id: 15116458

+ Status: Final

Categories: Vital Signs

Code: SpO2

Result: 91 %

+

Effective Date: Jun 5, 2022 3:00 A.M. CDT

' + }, + "identifier": [ + { + "system": 'https://fhir.cerner.com/cvuuid', + "value": '583a1e6e-e16b-4f5e-b893-4cf6e4a44daf' + } + ], + "status": 'amended', + "category": [ + { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/observation-category', + "code": 'vital-signs', + "display": 'Vital Signs' + } + ], + "text": 'Vital Signs' + } + ], + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '2708-6' + }, + { + "system": 'http://loinc.org', + "code": '59408-5' + } + ], + "text": 'SpO2' + }, + "subject": { + "reference": 'Patient/15116458' + }, + "encounter": { + "reference": 'Encounter/15693783' + }, + "effectiveDateTime": '2022-06-05T08:00:38.000Z', + "issued": '2022-06-05T08:00:38Z', + "performer": [ + { + "extension": [ + { + "valueCodeableConcept": { + "coding": [ { - 'system': 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation', - 'code': 'N', - 'display': 'Normal' + "system": 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', + "code": 'LA', + "display": 'legal authenticator' } - ] - } - ], - 'note': [ + ], + "text": 'legal authenticator' + }, + "url": 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' + } + ], + "reference": 'Practitioner/15441459' + } + ], + "valueQuantity": { + "value": 57, + "unit": '%', + "system": 'http://unitsofmeasure.org', + "code": '%' + }, + "component": [ + { + "code": { + "coding": [ { - 'authorReference': { - 'reference': 'Practitioner/11638346' - }, - 'time': '2017-02-25T02:41:03.000Z', - 'text': 'Other\n' + "system": 'http://loinc.org', + "code": '3151-8' } ], - 'referenceRange': [ - { - 'low': { - 'value': 36, - 'unit': 'degC', - 'system': 'http://unitsofmeasure.org', - 'code': 'Cel' - }, - 'high': { - 'value': 38, - 'unit': 'degC', - 'system': 'http://unitsofmeasure.org', - 'code': 'Cel' - }, - 'type': { - 'coding': [ - { - 'system': 'http://terminology.hl7.org/CodeSystem/referencerange-meaning', - 'code': 'normal', - 'display': 'Normal Range' - } - ], - 'text': 'Normal Range' - } - } - ] + "text": 'Oxygen Flow Rate' }, - 'search': { - 'mode': 'match' + "valueQuantity": { + "value": 7, + "unit": 'L/min', + "system": 'http://unitsofmeasure.org', + "code": 'L/min' } }, { - 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Provenance/vit-4', - 'resource': { - 'resourceType': 'Provenance', - 'id': 'vit-4', - 'meta': { - 'versionId': '4', - 'lastUpdated': '2020-12-03T16:28:02Z' - }, - 'text': { - 'status': 'generated', - 'div': '

Provenance

Target:

'\ - '

Recorded: Oct 25, 2019 9:57 A.M.'\ - ' CDT

Agents:

Unknown
Agent Type: Author
'\ - 'Agent Role: Source

Entity Source: DocumentReference/S-100

' - }, - 'target': [ - { - 'reference': 'Observation/VS-196190669' - } - ], - 'recorded': '2019-10-25T14:57:43Z', - 'agent': [ + "code": { + "coding": [ { - 'type': { - 'coding': [ - { - 'system': 'http://terminology.hl7.org/CodeSystem/provenance-participant-type', - 'code': 'author' - } - ], - 'text': 'Author' - }, - 'role': [ - { - 'coding': [ - { - 'system': 'http://terminology.hl7.org/CodeSystem/contractsignertypecodes', - 'code': 'SOURCE' - } - ], - 'text': 'Source' - } - ], - 'who': { - 'reference': 'Organization/101', - 'display': 'Unknown' - } + "system": 'http://loinc.org', + "code": '3150-0' } ], - 'entity': [ - { - 'role': 'source', - 'what': { - 'reference': 'DocumentReference/S-100' - } - } - ] + "text": 'FIO2' }, - 'search': { - 'mode': 'include' + "valueQuantity": { + "value": 27, + "unit": '%', + "system": 'http://unitsofmeasure.org', + "code": '%' } } ] diff --git a/lib/resources/r4/observation.yaml b/lib/resources/r4/observation.yaml index e26ca7577..c4c4d6806 100644 --- a/lib/resources/r4/observation.yaml +++ b/lib/resources/r4/observation.yaml @@ -155,7 +155,7 @@ fields: - name: code required: 'Yes' type: CodeableConcept - description: Describes what was observed. Sometimes this is called the observation "name". + description: Describes what was observed. Sometimes this is called the observation "code". action: - terminology - create @@ -192,7 +192,7 @@ fields: - name: code required: 'Yes' type: CodeableConcept - description: Describes what was observed. Sometimes this is called the observation "name". + description: Describes what was observed. Sometimes this is called the observation "code". action: - terminology - update @@ -1067,7 +1067,7 @@ fields: - name: code required: 'Yes' type: CodeableConcept - description: Describes what was observed. Sometimes this is called the observation "name". + description: Describes what was observed. Sometimes this is called the observation "code". binding: description: Codes identifying names of simple observations. terminology: @@ -1105,3 +1105,161 @@ fields: - display: v4 data absentreason system: http://terminology.hl7.org/CodeSystem/data-absent-reason info_link: https://hl7.org/fhir/R4/valueset-data-absent-reason.html + +- name: component + required: 'no' + type: List of BackboneElement + description: + Some observations have multiple component observations. These component observations are expressed as separate code + value pairs that share the same attributes. Examples include systolic and diastolic component observations for blood + pressure measurement and multiple component observations for genetics observations. + action: + - create + - update + example: | + { + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '8480-6' + } + ], + "text": 'Systolic Blood Pressure Invasive' + }, + "valueQuantity": { + "value": 120, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "interpretation": [ + { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation', + "code": 'N' + } + ] + } + ], + "referenceRange": [ + { + "low": { + "value": 45.0, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "high": { + "value": 75.0, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "type": { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/referencerange-meaning', + "code": 'normal' + } + ], + "text": 'Normal Range' + } + } + ] + } + url: https://hl7.org/fhir/R4/observation-definitions.html#Observation.component + note: | + + children: + + - name: code + required: 'Yes' + type: CodeableConcept + description: Describes what was observed. Sometimes this is called the observation "code". + example: | + { + "coding": [ + { + "system": 'http://loinc.org', + "code": '8480-6' + } + ], + "text": 'Systolic Blood Pressure Invasive' + } + url: https://hl7.org/fhir/R4/observation-definitions.html#Observation.component.code + + - name: value[x] + required: 'No' + type: List of CodeableConcept + description: The information determined as a result of making the observation, if the information has a simple value. + example: | + { + "value": 120, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + } + note: | + + url: https://hl7.org/fhir/R4/observation-definitions.html#Observation.component.value[x] + + - name: interpretation + required: 'No' + type: List of CodeableConcept + description: A categorical assessment of an observation value. For example, high, low, normal. + example: | + { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation', + "code": 'N' + } + ], + "text": 'NORMAL' + } + note: | + + url: https://hl7.org/fhir/R4/observation-definitions.html#Observation.component.interpretation + + - name: referenceRange + required: 'No' + type: CodeableConcept + description: Guidance on how to interpret the value by comparison to a normal or recommended range. + example: | + { + "low": { + "value": 45.0, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "high": { + "value": 75.0, + "unit": 'mmHg', + "system": 'http://unitsofmeasure.org', + "code": 'mm[Hg]' + }, + "type": { + "coding": [ + { + "system": 'http://terminology.hl7.org/CodeSystem/referencerange-meaning', + "code": 'normal' + } + ], + "text": 'Normal Range' + } + } + note: | + + url: https://hl7.org/fhir/R4/observation-definitions.html#Observation.component.referenceRange \ No newline at end of file From 82614c244c058b97b0532f3f01151a5943783ef6 Mon Sep 17 00:00:00 2001 From: Surya M Date: Mon, 10 Apr 2023 11:44:51 +0530 Subject: [PATCH 2/6] minor change --- lib/resources/r4/observation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resources/r4/observation.yaml b/lib/resources/r4/observation.yaml index c4c4d6806..76235c05d 100644 --- a/lib/resources/r4/observation.yaml +++ b/lib/resources/r4/observation.yaml @@ -1262,4 +1262,4 @@ fields:
  • Only one referenceRange is supported
  • `ReferenceRange.text` is not supported when `referenceRange.high` and/or `referenceRange.low` are provided. Only a referenceRange.type of `normal` is supported.
  • - url: https://hl7.org/fhir/R4/observation-definitions.html#Observation.component.referenceRange \ No newline at end of file + url: https://hl7.org/fhir/R4/observation-definitions.html#Observation.component.referenceRange From 3d70b3279ddea5533bae7f569e6138fb6c2976c2 Mon Sep 17 00:00:00 2001 From: Surya M Date: Mon, 10 Apr 2023 11:48:29 +0530 Subject: [PATCH 3/6] minor change --- lib/resources/r4/observation.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/resources/r4/observation.yaml b/lib/resources/r4/observation.yaml index 76235c05d..9b45e0ab8 100644 --- a/lib/resources/r4/observation.yaml +++ b/lib/resources/r4/observation.yaml @@ -155,7 +155,7 @@ fields: - name: code required: 'Yes' type: CodeableConcept - description: Describes what was observed. Sometimes this is called the observation "code". + description: Describes what was observed. Sometimes this is called the observation "name". action: - terminology - create @@ -192,7 +192,7 @@ fields: - name: code required: 'Yes' type: CodeableConcept - description: Describes what was observed. Sometimes this is called the observation "code". + description: Describes what was observed. Sometimes this is called the observation "name". action: - terminology - update @@ -1067,7 +1067,7 @@ fields: - name: code required: 'Yes' type: CodeableConcept - description: Describes what was observed. Sometimes this is called the observation "code". + description: Describes what was observed. Sometimes this is called the observation "name". binding: description: Codes identifying names of simple observations. terminology: @@ -1179,7 +1179,7 @@ fields: - name: code required: 'Yes' type: CodeableConcept - description: Describes what was observed. Sometimes this is called the observation "code". + description: Describes what was observed. Sometimes this is called the observation "name". example: | { "coding": [ From a8d50cfd86c7ab0ee463fe1db782ec82e7ea39e3 Mon Sep 17 00:00:00 2001 From: Surya M Date: Tue, 25 Jul 2023 00:47:02 +0530 Subject: [PATCH 4/6] update mocks --- .../example_json/r4_examples_observation.rb | 306 ++++++++++++------ 1 file changed, 213 insertions(+), 93 deletions(-) diff --git a/lib/resources/example_json/r4_examples_observation.rb b/lib/resources/example_json/r4_examples_observation.rb index a067f4349..b82db3c3c 100644 --- a/lib/resources/example_json/r4_examples_observation.rb +++ b/lib/resources/example_json/r4_examples_observation.rb @@ -1540,117 +1540,237 @@ module Resources }.freeze R4_OBSERVATION_REVINCLUDE_BUNDLE ||= { - "resourceType": 'Observation', - "id": 'VS-CV-78693473-SECT-8098', - "meta": { - "versionId": '0', - "lastUpdated": '2022-11-26T15:53:45Z' - }, - "text": { - "status": 'generated', - "div": '

    Observation

    Patient Id: 15116458

    - Status: Final

    Categories: Vital Signs

    Code: SpO2

    Result: 91 %

    -

    Effective Date: Jun 5, 2022 3:00 A.M. CDT

    ' - }, - "identifier": [ - { - "system": 'https://fhir.cerner.com/cvuuid', - "value": '583a1e6e-e16b-4f5e-b893-4cf6e4a44daf' - } - ], - "status": 'amended', - "category": [ + 'resourceType': 'Bundle', + 'id': '79c71e5b-2793-4ace-bc5e-190e38784e80', + 'type': 'searchset', + 'link': [ { - "coding": [ - { - "system": 'http://terminology.hl7.org/CodeSystem/observation-category', - "code": 'vital-signs', - "display": 'Vital Signs' - } - ], - "text": 'Vital Signs' + 'relation': 'self', + 'url': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation?Observation?patient=12457977&category=vital-signs&_revinclude=Provenance%3Atarget' } ], - "code": { - "coding": [ - { - "system": 'http://loinc.org', - "code": '2708-6' - }, - { - "system": 'http://loinc.org', - "code": '59408-5' - } - ], - "text": 'SpO2' - }, - "subject": { - "reference": 'Patient/15116458' - }, - "encounter": { - "reference": 'Encounter/15693783' - }, - "effectiveDateTime": '2022-06-05T08:00:38.000Z', - "issued": '2022-06-05T08:00:38Z', - "performer": [ + 'entry': [ { - "extension": [ - { - "valueCodeableConcept": { - "coding": [ + 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/VS-196190669', + 'resource': { + 'resourceType': 'Observation', + 'id': 'VS-196190669', + 'meta': { + 'versionId': '2', + 'lastUpdated': '2017-02-25T02:41:03.000Z' + }, + 'text': { + 'status': 'generated', + 'div': '

    Observation

    Patient Id:12457977'\ + '

    Status: Entered in Error

    Categories: Vital Signs

    Code'\ + ': Temperature Temporal Artery

    Result: 39 degC

    Interpretation'\ + ': Normal

    Effective Date: Feb 24, 2017 8:37 P.M. CST

    '\ + '

    Reference Range: 36-38 degC

    ' + }, + 'identifier': [ + { + 'system': 'https://fhir.cerner.com/ceuuid', + 'value': 'CE87caf4b7-9397-4667-9897-702218017c9e-196190669-2017022502373000' + } + ], + 'status': 'entered-in-error', + 'category': [ + { + 'coding': [ { - "system": 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', - "code": 'LA', - "display": 'legal authenticator' + 'system': 'http://terminology.hl7.org/CodeSystem/observation-category', + 'code': 'vital-signs', + 'display': 'Vital Signs' } ], - "text": 'legal authenticator' - }, - "url": 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' - } - ], - "reference": 'Practitioner/15441459' - } - ], - "valueQuantity": { - "value": 57, - "unit": '%', - "system": 'http://unitsofmeasure.org', - "code": '%' - }, - "component": [ - { - "code": { - "coding": [ + 'text': 'Vital Signs' + } + ], + 'code': { + 'coding': [ + { + 'system': 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72', + 'code': '4157752', + 'display': 'Temperature Temporal Artery', + 'userSelected': true + }, + { + 'system': 'http://loinc.org', + 'code': '75539-7', + 'display': 'Body temperature - Temporal artery' + }, + { + 'system': 'http://loinc.org', + 'code': '8310-5', + 'display': 'Body temperature' + } + ], + 'text': 'Temperature Temporal Artery' + }, + 'subject': { + 'reference': 'Patient/12457977' + }, + 'encounter': { + 'reference': 'Encounter/97697398' + }, + 'effectiveDateTime': '2017-02-25T02:37:00.000Z', + 'issued': '2017-02-25T02:41:03.000Z', + 'performer': [ { - "system": 'http://loinc.org', - "code": '3151-8' + 'extension': [ + { + 'valueCodeableConcept': { + 'coding': [ + { + 'system': 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', + 'code': 'LA', + 'display': 'legal authenticator' + } + ], + 'text': 'legal authenticator' + }, + 'url': 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' + }, + { + 'valueCodeableConcept': { + 'coding': [ + { + 'system': 'http://terminology.hl7.org/CodeSystem/v3-ParticipationType', + 'code': 'PPRF', + 'display': 'primary performer' + } + ], + 'text': 'primary performer' + }, + 'url': 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' + } + ], + 'reference': 'Practitioner/11638346' } ], - "text": 'Oxygen Flow Rate' + 'valueQuantity': { + 'value': 39, + 'unit': 'degC', + 'system': 'http://unitsofmeasure.org', + 'code': 'Cel' + }, + 'interpretation': [ + { + 'coding': [ + { + 'system': 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/52', + 'code': '214', + 'userSelected': true + }, + { + 'system': 'http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation', + 'code': 'N', + 'display': 'Normal' + } + ] + } + ], + 'note': [ + { + 'authorReference': { + 'reference': 'Practitioner/11638346' + }, + 'time': '2017-02-25T02:41:03.000Z', + 'text': 'Other\n' + } + ], + 'referenceRange': [ + { + 'low': { + 'value': 36, + 'unit': 'degC', + 'system': 'http://unitsofmeasure.org', + 'code': 'Cel' + }, + 'high': { + 'value': 38, + 'unit': 'degC', + 'system': 'http://unitsofmeasure.org', + 'code': 'Cel' + }, + 'type': { + 'coding': [ + { + 'system': 'http://terminology.hl7.org/CodeSystem/referencerange-meaning', + 'code': 'normal', + 'display': 'Normal Range' + } + ], + 'text': 'Normal Range' + } + } + ] }, - "valueQuantity": { - "value": 7, - "unit": 'L/min', - "system": 'http://unitsofmeasure.org', - "code": 'L/min' + 'search': { + 'mode': 'match' } }, { - "code": { - "coding": [ + 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Provenance/vit-4', + 'resource': { + 'resourceType': 'Provenance', + 'id': 'vit-4', + 'meta': { + 'versionId': '4', + 'lastUpdated': '2020-12-03T16:28:02Z' + }, + 'text': { + 'status': 'generated', + 'div': '

    Provenance

    Target:

    '\ + '
    • Observation/VS-196190669

    Recorded: Oct 25, 2019 9:57 A.M.'\ + ' CDT

    Agents:

    Unknown
    Agent Type: Author
    '\ + 'Agent Role: Source

    Entity Source: DocumentReference/S-100

    ' + }, + 'target': [ { - "system": 'http://loinc.org', - "code": '3150-0' + 'reference': 'Observation/VS-196190669' } ], - "text": 'FIO2' + 'recorded': '2019-10-25T14:57:43Z', + 'agent': [ + { + 'type': { + 'coding': [ + { + 'system': 'http://terminology.hl7.org/CodeSystem/provenance-participant-type', + 'code': 'author' + } + ], + 'text': 'Author' + }, + 'role': [ + { + 'coding': [ + { + 'system': 'http://terminology.hl7.org/CodeSystem/contractsignertypecodes', + 'code': 'SOURCE' + } + ], + 'text': 'Source' + } + ], + 'who': { + 'reference': 'Organization/101', + 'display': 'Unknown' + } + } + ], + 'entity': [ + { + 'role': 'source', + 'what': { + 'reference': 'DocumentReference/S-100' + } + } + ] }, - "valueQuantity": { - "value": 27, - "unit": '%', - "system": 'http://unitsofmeasure.org', - "code": '%' + 'search': { + 'mode': 'include' } } ] From b577291031163e91119c48bea4aa7cbca40db7b9 Mon Sep 17 00:00:00 2001 From: Surya M Date: Fri, 4 Aug 2023 12:14:56 +0530 Subject: [PATCH 5/6] minor updates --- content/millennium/r4/clinical/diagnostics/observation.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/millennium/r4/clinical/diagnostics/observation.md b/content/millennium/r4/clinical/diagnostics/observation.md index 40ea42cca..95dbf2360 100644 --- a/content/millennium/r4/clinical/diagnostics/observation.md +++ b/content/millennium/r4/clinical/diagnostics/observation.md @@ -241,7 +241,6 @@ _Implementation Notes_ * Individual systolic and diastolic components will be paired upon subsequent search or read as long as the blood pressures are paired in Millennium. See [Configure Blood Pressure Event Set Pairing Hierarchy]. * Only the body fields mentioned below are supported. Unsupported fields will be ignored. -* Also supports creating observation with proprietary codes. * Modifier fields should not be provided, and will cause the transaction to fail. * Also supports creating observation with proprietary codes with the latest version of observation. From d93b806b109201b6039790335114b1a4c0e14eb0 Mon Sep 17 00:00:00 2001 From: Surya M Date: Thu, 10 Aug 2023 17:59:44 +0530 Subject: [PATCH 6/6] added beta tag --- .../r4/clinical/diagnostics/observation.md | 8 +- .../example_json/r4_examples_observation.rb | 74 +++++++++++++++---- lib/resources/r4/observation.yaml | 4 +- 3 files changed, 64 insertions(+), 22 deletions(-) diff --git a/content/millennium/r4/clinical/diagnostics/observation.md b/content/millennium/r4/clinical/diagnostics/observation.md index 95dbf2360..7f9f1c90b 100644 --- a/content/millennium/r4/clinical/diagnostics/observation.md +++ b/content/millennium/r4/clinical/diagnostics/observation.md @@ -271,11 +271,11 @@ _Note_: <%= json(:R4_OBSERVATION_CREATE) %> #### Vitals - Blood Pressure Body Example - +<%= beta_tag(action: true) %> <%= json(:R4_OBSERVATION_BP_CREATE) %> #### Vitals - Pulse Oximetry Body Example - +<%= beta_tag(action: true) %> <%= json(:R4_OBSERVATION_PO_CREATE) %> #### Labs Body Example @@ -358,7 +358,7 @@ _Note_: PUT https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/BP-59857018-59857020 #### Vitals - Blood Pressure Body Example - +<%= beta_tag(action: true) %> <%= json(:R4_OBSERVATION_VITALS_BP_UPDATE) %> #### Request @@ -366,7 +366,7 @@ _Note_: PUT https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/VS-CV-78693473-SECT-8098 #### Vitals - Pulse Oximetry Body Example - +<%= beta_tag(action: true) %> <%= json(:R4_OBSERVATION_VITALS_PO_UPDATE) %> #### Response diff --git a/lib/resources/example_json/r4_examples_observation.rb b/lib/resources/example_json/r4_examples_observation.rb index b82db3c3c..6c0ce663d 100644 --- a/lib/resources/example_json/r4_examples_observation.rb +++ b/lib/resources/example_json/r4_examples_observation.rb @@ -1472,14 +1472,14 @@ module Resources R4_OBSERVATION_VITALS_PO_UPDATE ||= { "resourceType": 'Observation', - "id": 'VS-197356031', + "id": 'VS-CV-83059963-SECT-8098', "identifier": [ { - "system": 'https://fhir.cerner.com/ceuuid', - "value": 'CE87caf4b7-9397-4667-9897-702218017c9e-197356031-2021061619245900' + "system": 'https://fhir.cerner.com/cvuuid', + "value": '8344a9b7-b1b7-406e-b303-1009edd66459' } ], - "status": 'corrected', + "status": 'amended', "category": [ { "coding": [ @@ -1495,13 +1495,17 @@ module Resources "code": { "coding": [ { - "system": 'https://fhir.cerner.com/d242a518-4074-4bd4-a3a6-adfe0c5c1c51/codeSet/72', - "code": '703558', - "display": 'Temperature Oral', - "userSelected": true + "system": 'http://loinc.org', + "code": '2708-6', + "display": 'Oxygen saturation in Arterial blood' + }, + { + "system": 'http://loinc.org', + "code": '59408-5', + "display": 'Oxygen saturation in Arterial blood by Pulse oximetry' } ], - "text": 'Temperature Oral' + "text": 'SpO2' }, "subject": { "reference": 'Patient/12457979' @@ -1509,8 +1513,8 @@ module Resources "encounter": { "reference": 'Encounter/97787491' }, - "effectiveDateTime": '2020-07-04T07:15:00.000Z', - "issued": '2021-05-06T20:07:14.000Z', + "effectiveDateTime": '2022-06-05T08:00:38.022Z', + "issued": '2022-06-05T08:00:56Z', "performer": [ { "extension": [ @@ -1528,15 +1532,53 @@ module Resources "url": 'http://hl7.org/fhir/StructureDefinition/event-performerFunction' } ], - "reference": 'Practitioner/1' + "reference": 'Practitioner/15441459' } ], "valueQuantity": { - "value": 123, - "unit": 'mmHg', + "value": 44, + "unit": '%', "system": 'http://unitsofmeasure.org', - "code": 'mm[Hg]' - } + "code": '%' + }, + "component": [ + { + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '3151-8', + "display": 'Inhaled oxygen flow rate' + } + ], + "text": 'Oxygen Flow Rate' + }, + "valueQuantity": { + "value": 55, + "unit": 'L/min', + "system": 'http://unitsofmeasure.org', + "code": 'L/min' + } + }, + { + "code": { + "coding": [ + { + "system": 'http://loinc.org', + "code": '3150-0', + "display": 'Inhaled oxygen concentration' + } + ], + "text": 'FIO2' + }, + "valueQuantity": { + "value": 66, + "unit": '%', + "system": 'http://unitsofmeasure.org', + "code": '%' + } + } + ] }.freeze R4_OBSERVATION_REVINCLUDE_BUNDLE ||= { diff --git a/lib/resources/r4/observation.yaml b/lib/resources/r4/observation.yaml index 9b45e0ab8..49cbd7f73 100644 --- a/lib/resources/r4/observation.yaml +++ b/lib/resources/r4/observation.yaml @@ -625,7 +625,7 @@ fields:
      -
    • Laboratory support `valueQuantity`, `valueCodeableConcept`, `valueString` and `valueDateTime`.
    • +
    • Laboratory support `valueQuantity`, `valueCodeableConcept`, `valueString`, `valueAttachment` and `valueDateTime`.
    url: https://hl7.org/fhir/R4/observation-definitions.html#Observation.value[x] @@ -1107,7 +1107,7 @@ fields: info_link: https://hl7.org/fhir/R4/valueset-data-absent-reason.html - name: component - required: 'no' + required: 'No' type: List of BackboneElement description: Some observations have multiple component observations. These component observations are expressed as separate code