From b7b66daee9319a6d426d1a7846ae91919041807e Mon Sep 17 00:00:00 2001 From: Elina Kolodiazhna Date: Mon, 5 Sep 2022 18:30:51 +0200 Subject: [PATCH 1/4] R4 - Observation resource updates --- .../r4/clinical/diagnostics/observation.md | 27 +- .../example_json/r4_examples_observation.rb | 239 ++++++++++++++---- 2 files changed, 208 insertions(+), 58 deletions(-) diff --git a/content/millennium/r4/clinical/diagnostics/observation.md b/content/millennium/r4/clinical/diagnostics/observation.md index 20e57f3d0..184e5b378 100644 --- a/content/millennium/r4/clinical/diagnostics/observation.md +++ b/content/millennium/r4/clinical/diagnostics/observation.md @@ -14,9 +14,8 @@ The following fields are returned if valued: * [Id](https://hl7.org/fhir/R4/resource-definitions.html#Resource.id){:target="_blank"} * [Identifier](https://hl7.org/fhir/R4/observation-definitions.html#Observation.identifier){:target="_blank"} -* [BasedOn](https://hl7.org/fhir/R4/observation-definitions.html#Observation.basedOn){:target="_blank"} * [Status](https://hl7.org/fhir/R4/observation-definitions.html#Observation.status){:target="_blank"} -* [Category (laboratory, social history)](https://hl7.org/fhir/R4/observation-definitions.html#Observation.category){:target="_blank"} +* [Category (laboratory, social history, vital-signs)](https://hl7.org/fhir/R4/observation-definitions.html#Observation.category){:target="_blank"} * [Code (Observation name or text)](https://hl7.org/fhir/R4/observation-definitions.html#Observation.code){:target="_blank"} * [Subject (Patient)](https://hl7.org/fhir/R4/observation-definitions.html#Observation.subject){:target="_blank"} * [Encounter](https://hl7.org/fhir/R4/observation-definitions.html#Observation.encounter){:target="_blank"} @@ -29,7 +28,7 @@ The following fields are returned if valued: * [Quantity comparator (<, <=, >, >=)](https://hl7.org/fhir/R4/datatypes-definitions.html#Quantity.comparator){:target="_blank"} * [Quantity units](https://hl7.org/fhir/R4/datatypes-definitions.html#Quantity.unit){:target="_blank"} * For Observations with `valueCodeableConcept` - * [Codeable concept](https://hl7.org/fhir/R4/datatypes-definitions.html#CodeableConcept){:target="_blank"} + * [Codeable concept](https://hl7.org/fhir/R4/datatypes-definitions.html#CodeableConcept){:target="_blank"} * [Data absent reason](https://hl7.org/fhir/R4/observation-definitions.html#Observation.dataAbsentReason){:target="_blank"} * [Interpretation (abnormal flagging)](https://hl7.org/fhir/R4/observation-definitions.html#Observation.interpretation){:target="_blank"} * [Note (comments)](https://hl7.org/fhir/R4/observation-definitions.html#Observation.note){:target="_blank"} @@ -66,9 +65,13 @@ _Implementation Notes_ * The `comments` field may have RTF or other formatted data rather than simple text. This is an issue that will be resolved in a future correction. We are investigating alternative solutions to fix this. +* Social History results won't be affected by date and _lastUpdated parameters, results may contain social history records out of the given timeframe. + +* Searching records with vital-signs category by code with proprietary system will result in empty response. + * When multiple pages of Observation results are returned for a single query: * All Social history Observations (if any qualify for the query) will be returned on the first page of results. This means that the next bullet does not apply to Social history Observations. - * Results are sorted by effective date/time in descending order by page. That is, all Observations on any given page of results are newer than all Observations on the next page of results. Sort order within pages is not guaranteed. + * Results are sorted by effective date/time in descending order. That is, all Observations on any given page of results are newer than all Observations on the next page of results. * If the query uses the `_lastUpdated` query parameter, results are sorted by last updated date/time in descending order by page, not by effective date/time. ### Parameters @@ -93,9 +96,9 @@ Notes: * It is recommended to search by either `code` or `date` (or both). * The `code` parameter: - * May be a list of comma separated values. A system must be provided for each code. + * May be a list of comma separated values. + * Searches only `Observation.code`. For example when fetching blood pressures the resource will be only be returned when the search is based on `85354-9(Systolic and Diastolic BP)`. Using the component codes `8480-6(Systolic BP)` or `8462-4 (Diastolic BP)` will not return the resource. - * Searching with proprietary codes or systems is not supported. * The `date` and `_lastUpdated` parameters may be provided up to two times, and must use the `eq`, `ge`, `gt`, `le`, or `lt` prefixes. When a value is provided without a prefix, an implied `eq` prefix is used. When provided twice, the lower value must have a `ge` or `gt` prefix and the higher value must have an `le` or `lt` prefix. @@ -103,11 +106,15 @@ Notes: * The `_lastUpdated` query will only qualify clinically significant updates. For example, changes to the value or code, and other significant fields. Minor updates, like some non-clinically relevant note updates, will not qualify. +* When _count parameter is provided, + * it won’t affect the first page, because all social history data will appear in the first page regardless of requested count. + * Second page onward, returned item count may be less than requested. + * The `_revinclude` parameter may be provided once with the value `Provenance:target`. Example: `_revinclude=Provenance:target` * The `_revinclude` parameter may be provided with the `patient/subject` parameter. Example: `patient=12457977&category=vital-signs&_revinclude=Provenance:target` -* When `_revinclude` is provided in a request to the closed endpoint, the OAuth2 token must include the `user/Provenance.read` scope. Currently `patient/Provenance.read` is not supported and hence `_revinclude` cannot be utilised for patient persona. +* When `_revinclude` is provided in a request to the closed endpoint, the OAuth2 token must include the `user/Provenance.read` scope. ### Headers @@ -130,7 +137,7 @@ Notes: ### Authorization Types -<%= authorization_types(provider: true, system: true) %> +<%= authorization_types(provider: true, patient: true, system: true) %> #### Request @@ -186,7 +193,7 @@ _Implementation Notes_ #### Request - GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/M-197292857 + GET https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/VS-197292857 #### Response @@ -218,7 +225,7 @@ _Implementation Notes_
Provider (Vital Signs and Laboratory) | System (Vital Signs and Laboratory)
-_Note_: +_Note_: * Vital Sign creates via a Provider persona requires an active relationship between the Provider and the Patient. diff --git a/lib/resources/example_json/r4_examples_observation.rb b/lib/resources/example_json/r4_examples_observation.rb index 3e14c6c24..6b371eed2 100644 --- a/lib/resources/example_json/r4_examples_observation.rb +++ b/lib/resources/example_json/r4_examples_observation.rb @@ -3,10 +3,10 @@ module Cerner module Resources R4_OBSERVATION_ENTRY ||= { - 'fullUrl': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/M-197292857', + 'fullUrl': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/VS-197292857', 'resource': { 'resourceType': 'Observation', - 'id': 'M-197292857', + 'id': 'VS-197292857', 'meta': { 'versionId': '1', 'lastUpdated': '2020-07-06T21:13:24.000Z' @@ -26,11 +26,6 @@ module Resources 'value': 'CE87caf4b7-9397-4667-9897-702218017c9e-197292857-2020070621132500' } ], - 'basedOn': [ - { - 'reference': 'ServiceRequest/313764715' - } - ], 'status': 'final', 'category': [ { @@ -228,7 +223,16 @@ module Resources 'subject': { 'reference': 'Patient/12724066' }, + 'encounter': { + 'reference': 'Encounter/18565902' + }, + 'effectiveDateTime': '2022-06-01T10:39:02Z', 'issued': '2020-06-11T04:05:33.000Z', + 'performer': [ + { + 'reference': 'Practitioner/15441459' + } + ], 'hasMember': [ { 'reference': 'Observation/SH-73080191-q4625817' @@ -281,7 +285,16 @@ module Resources 'subject': { 'reference': 'Patient/12724066' }, + 'encounter': { + 'reference': 'Encounter/18565902' + }, + 'effectiveDateTime': '2022-06-01T10:39:02Z', 'issued': '2020-06-11T04:05:33.000Z', + 'performer': [ + { + 'reference': 'Practitioner/15441459' + } + ], 'valueCodeableConcept': { 'coding': [ { @@ -337,7 +350,16 @@ module Resources 'subject': { 'reference': 'Patient/12724066' }, + 'encounter': { + 'reference': 'Encounter/18565902' + }, + 'effectiveDateTime': '2022-06-01T10:39:02Z', 'issued': '2020-06-11T04:05:33.000Z', + 'performer': [ + { + 'reference': 'Practitioner/15441459' + } + ], 'valueCodeableConcept': { 'coding': [ { @@ -350,6 +372,121 @@ module Resources } } }, + { + 'fullUrl': 'https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/VS-CV-55046871-SECT-8098', + 'resource': { + 'resourceType': 'Observation', + 'id': 'VS-CV-55046871-SECT-8098', + 'meta': { + 'versionId': '0', + 'lastUpdated': '2022-06-17T10:41:35Z' + }, + 'text': { + 'status': 'generated', + 'div': "

Observation

Patient Id: 15116458

Status: Final

Categories: Vital Signs

Code: SpO2

Result: 95 %

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

" + }, + 'status': 'final', + '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/eb2384f8-839e-4c6e-8b29-18e71db1a0b1/codeSet/72', + 'code': '3623994', + 'display': 'SpO2', + 'userSelected': true + }, + { + 'system': 'http://loinc.org', + 'code': '2708-6' + }, + { + 'system': 'http://loinc.org', + 'code': '59408-5' + } + ], + 'text': 'SpO2' + }, + 'subject': { + 'reference': 'Patient/12724066' + }, + 'encounter': { + 'reference': 'Encounter/18565902' + }, + 'effectiveDateTime': '2022-06-05T08:00:38.000Z', + 'issued': '2022-06-05T08:00:38Z', + 'performer': [ + { + 'reference': 'Practitioner/15441459', + } + ], + 'valueQuantity': { + 'value': 95, + 'unit': '%', + 'system': 'http://unitsofmeasure.org', + 'code': '%' + }, + 'component': [ + { + 'code': { + 'coding': [ + { + 'system': 'https://fhir.cerner.com/eb2384f8-839e-4c6e-8b29-18e71db1a0b1/codeSet/72', + 'code': '703569', + 'display': 'Oxygen Flow Rate', + 'userSelected': true + }, + { + 'system': 'http://loinc.org', + 'code': '3151-8' + } + ], + 'text': 'Oxygen Flow Rate' + }, + 'valueQuantity': { + 'value': 7, + 'unit': 'L/min', + 'system': 'http://unitsofmeasure.org', + 'code': 'L/min' + } + }, + { + 'code': { + 'coding': [ + { + 'system': 'https://fhir.cerner.com/eb2384f8-839e-4c6e-8b29-18e71db1a0b1/codeSet/72', + 'code': '2700657', + 'display': 'FIO2', + 'userSelected': true + }, + { + 'system': 'http://loinc.org', + 'code': '3150-0', + 'display': 'Inhaled Oxygen concentration' + } + ], + 'text': 'Inhaled Oxygen concentration' + }, + 'valueQuantity': { + 'value': 21, + 'unit': '%', + 'system': 'http://unitsofmeasure.org', + 'code': '%' + } + } + ] + } + }, R4_OBSERVATION_ENTRY ] }.freeze @@ -411,6 +548,10 @@ module Resources 'subject': { 'reference': 'Patient/12742400' }, + 'encounter': { + 'reference': 'Encounter/18565902' + }, + 'effectiveDateTime': '2022-06-01T10:39:02Z', 'issued': '2020-12-11T16:38:37.000Z', 'hasMember': [ { @@ -420,48 +561,49 @@ module Resources } }, { - 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/M-197412603', + 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/L-197412603', 'resource': { 'resourceType': 'Observation', - 'id': 'M-197412603', + 'id': 'L-197412603', 'text': { 'status': 'generated', 'div': '

Observation

'\ '

Patient Id: 12742400

Status: Preliminary

'\ - '

Code: Masked

' + '

Code: Hgb Bld-mCnc

' }, 'status': 'preliminary', 'category': [ { - 'extension': [ + 'coding': [ { - 'valueCode': 'unknown', - 'url': 'http://hl7.org/fhir/StructureDefinition/data-absent-reason' + 'system': 'http://terminology.hl7.org/CodeSystem/observation-category', + 'code': 'laboratory', + 'display': 'Laboratory' } - ] + ], + 'text': 'Laboratory' } ], 'code': { 'coding': [ { - 'system': 'http://terminology.hl7.org/CodeSystem/data-absent-reason', - 'code': 'masked', - 'display': 'Masked' + 'system': 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72', + 'code': '703535', + 'display': 'Hgb Bld-mCnc', + 'userSelected': true + }, + { + 'system': 'http://loinc.org', + 'code': '718-7', + 'display': 'Hgb Bld-mCnc' } ], - 'text': 'Masked' + 'text': 'Hgb Bld-mCnc' }, 'subject': { 'reference': 'Patient/12742400' }, - '_effectiveDateTime': { - 'extension': [ - { - 'valueCode': 'unknown', - 'url': 'http://hl7.org/fhir/StructureDefinition/data-absent-reason' - } - ] - }, + 'effectiveDateTime': '2022-06-01T10:39:02Z', 'dataAbsentReason': { 'coding': [ { @@ -493,10 +635,10 @@ module Resources ], 'entry': [ { - 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/M-197412603', + 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/L-197412603', 'resource': { 'resourceType': 'Observation', - 'id': 'M-197412603', + 'id': 'L-197412603', 'text': { 'status': 'generated', 'div': '

Observation

'\ @@ -506,35 +648,36 @@ module Resources 'status': 'entered-in-error ', 'category': [ { - 'extension': [ + 'coding': [ { - 'valueCode': 'error', - 'url': 'http://hl7.org/fhir/StructureDefinition/data-absent-reason' + 'system': 'http://terminology.hl7.org/CodeSystem/observation-category', + 'code': 'laboratory', + 'display': 'Laboratory' } - ] + ], + 'text': 'Laboratory' } ], 'code': { 'coding': [ { - 'system': 'http://terminology.hl7.org/CodeSystem/data-absent-reason', - 'code': 'error', - 'display': 'Error' + 'system': 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72', + 'code': '703535', + 'display': 'Hgb Bld-mCnc', + 'userSelected': true + }, + { + 'system': 'http://loinc.org', + 'code': '718-7', + 'display': 'Hgb Bld-mCnc' } ], - 'text': 'Error' + 'text': 'Hgb Bld-mCnc' }, 'subject': { 'reference': 'Patient/12742401' }, - '_effectiveDateTime': { - 'extension': [ - { - 'valueCode': 'error', - 'url': 'http://hl7.org/fhir/StructureDefinition/data-absent-reason' - } - ] - }, + 'effectiveDateTime': '2022-06-01T10:38:02Z', 'dataAbsentReason': { 'coding': [ { @@ -908,10 +1051,10 @@ module Resources ], 'entry': [ { - 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/M-196190669', + 'fullUrl': 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/VS-196190669', 'resource': { 'resourceType': 'Observation', - 'id': 'M-196190669', + 'id': 'VS-196190669', 'meta': { 'versionId': '2', 'lastUpdated': '2017-02-25T02:41:03.000Z' @@ -1077,13 +1220,13 @@ module Resources 'text': { 'status': 'generated', 'div': '

Provenance

Target:

'\ - '
  • Observation/M-196190669

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

  • 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': [ { - 'reference': 'Observation/M-196190669' + 'reference': 'Observation/VS-196190669' } ], 'recorded': '2019-10-25T14:57:43Z', From 8c7f16de002a88195e43abf80925a691171c1fd8 Mon Sep 17 00:00:00 2001 From: Elina Kolodiazhna Date: Tue, 6 Sep 2022 13:50:24 +0200 Subject: [PATCH 2/4] fix missing id --- content/millennium/r4/clinical/diagnostics/observation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/millennium/r4/clinical/diagnostics/observation.md b/content/millennium/r4/clinical/diagnostics/observation.md index 184e5b378..9c199a017 100644 --- a/content/millennium/r4/clinical/diagnostics/observation.md +++ b/content/millennium/r4/clinical/diagnostics/observation.md @@ -260,7 +260,7 @@ Content-Length: 0 Content-Type: text/html Date: Mon, 16 Nov 2020 22:05:40 GMT Etag: W/"1" -Location: https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/M-197392513 +Location: https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/L-197392513 Last-Modified: Mon, 16 Nov 2020 22:05:40 GMT Vary: Origin X-Request-Id: 30a3177d-0987-460d-bb27-a5bb6303f03e From 98a6d9b016b2901552dbd40bf53efc9ecc1e3add Mon Sep 17 00:00:00 2001 From: Elina Kolodiazhna Date: Tue, 6 Sep 2022 13:57:33 +0200 Subject: [PATCH 3/4] replace M prefixes with valid ones --- content/millennium/r4/clinical/diagnostics/observation.md | 2 +- lib/resources/example_json/r4_examples_observation.rb | 4 ++-- lib/resources/r4/observation.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/millennium/r4/clinical/diagnostics/observation.md b/content/millennium/r4/clinical/diagnostics/observation.md index 9c199a017..23b5603dd 100644 --- a/content/millennium/r4/clinical/diagnostics/observation.md +++ b/content/millennium/r4/clinical/diagnostics/observation.md @@ -307,7 +307,7 @@ _Note_: #### Request - PUT https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/M-196186655 + PUT https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Observation/L-196186655 #### Labs Body Example diff --git a/lib/resources/example_json/r4_examples_observation.rb b/lib/resources/example_json/r4_examples_observation.rb index 6b371eed2..d07a0b5af 100644 --- a/lib/resources/example_json/r4_examples_observation.rb +++ b/lib/resources/example_json/r4_examples_observation.rb @@ -884,7 +884,7 @@ module Resources R4_OBSERVATION_LABS_UPDATE ||= { "resourceType": 'Observation', - "id": 'M-196186655', + "id": 'L-196186655', "status": 'corrected', "meta": { "source": '43ba6d6a-1006-4546-bf28-48d84a98dbb1' @@ -972,7 +972,7 @@ module Resources R4_OBSERVATION_VITALS_UPDATE ||= { "resourceType": 'Observation', - "id": 'M-197356031', + "id": 'VS-197356031', "identifier": [ { "system": 'https://fhir.cerner.com/ceuuid', diff --git a/lib/resources/r4/observation.yaml b/lib/resources/r4/observation.yaml index 0581c2b82..e26ca7577 100644 --- a/lib/resources/r4/observation.yaml +++ b/lib/resources/r4/observation.yaml @@ -23,7 +23,7 @@ fields: action: update example: | { - "id": "M-197391609" + "id": "L-197391609" } note: The id value must match the Observation/<id> value. url: https://hl7.org/fhir/resource-definitions.html#Resource.id From 443c9248c238a2a75c2380fdd987463fd869dc9d Mon Sep 17 00:00:00 2001 From: Elina Kolodiazhna Date: Tue, 6 Sep 2022 14:13:56 +0200 Subject: [PATCH 4/4] add missing quotes --- content/millennium/r4/clinical/diagnostics/observation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/millennium/r4/clinical/diagnostics/observation.md b/content/millennium/r4/clinical/diagnostics/observation.md index 23b5603dd..b4acc334c 100644 --- a/content/millennium/r4/clinical/diagnostics/observation.md +++ b/content/millennium/r4/clinical/diagnostics/observation.md @@ -106,7 +106,7 @@ Notes: * The `_lastUpdated` query will only qualify clinically significant updates. For example, changes to the value or code, and other significant fields. Minor updates, like some non-clinically relevant note updates, will not qualify. -* When _count parameter is provided, +* When `_count` parameter is provided, * it won’t affect the first page, because all social history data will appear in the first page regardless of requested count. * Second page onward, returned item count may be less than requested.