From fc9331881c490859c833ae5adca62cb6b99ab4c5 Mon Sep 17 00:00:00 2001 From: Someshwara N <35108040+Someshnsn@users.noreply.github.com> Date: Thu, 4 Apr 2024 17:14:15 +0530 Subject: [PATCH] Encounter support for _lastupdated and NutritionOrder support for _revinclude (#1046) --- .../r4/base/management/encounter.md | 2 + .../care-provision/nutrition-order.md | 26 + .../r4_examples_nutrition_order.rb | 695 ++++++++++++++++++ 3 files changed, 723 insertions(+) diff --git a/content/millennium/r4/base/management/encounter.md b/content/millennium/r4/base/management/encounter.md index 686745b7c..f27efa990 100644 --- a/content/millennium/r4/base/management/encounter.md +++ b/content/millennium/r4/base/management/encounter.md @@ -109,6 +109,7 @@ Name | Required | Type | Description [`_count`] | No | [`number`] | The maximum number of results to return. `status` | No | [`token`] | The status of the Encounter. Example: `planned` `_revinclude` | No | [`token`] | Provenance resource entries to be returned as part of the bundle. Example: `_revinclude=Provenance:target` +`_lastUpdated`| No | [`dateTime`] | Datetime on which the Encounter was last updated. Example: `_lastUpdated=gt2014-09-24` or `_lastUpdated=gt2014-09-24T12:00:00.000Z` Notes: @@ -134,6 +135,7 @@ Notes: * Code details are required. System is optional. If a system is not provided, search is performed across all systems supported by the Encounter resource. * When a valid system is provided, search is performed against the specific system. +* The `_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. ### Headers diff --git a/content/millennium/r4/clinical/care-provision/nutrition-order.md b/content/millennium/r4/clinical/care-provision/nutrition-order.md index 13ed1b7c5..1b16cc792 100644 --- a/content/millennium/r4/clinical/care-provision/nutrition-order.md +++ b/content/millennium/r4/clinical/care-provision/nutrition-order.md @@ -60,6 +60,7 @@ Search for nutrition orders that meet the supplied query parameters. `status` | No | [`token`] | The status of the nutrition order. Example: `active` `_lastUpdated` | No | [`date`] | An explicit or implied date and time range during which the most recent clinically relevant update was made to the nutrition order. Must include a time, and must be prefixed by ‘ge’ or ‘le’. Example: `ge2014-05-19T20:54:02.000Z` [`_count`] | No | [`number`] | The maximum number of nutrition orders to include on a page. + `_revinclude` | No | [`token`] | Provenance resource entries to be returned as part of the bundle. Example: `_revinclude=Provenance:target` Notes: @@ -67,6 +68,11 @@ Notes: * The `_lastUpdated` parameter may be provided in the following formats: * Once with a prefix of ‘ge’ or ‘le’ representing the earliest date or latest date (for example, `date=ge2015-01-01` or `date=le2016-01-01`). * Twice with the prefixes of ‘ge’ and ‘le’ to indicate a specific range (for example, `date=ge2015-01-01&date=le2016-01-01`). +* When searching with the `_revinclude` parameter + * It may be provided once with the value `Provenance:target`. Example: `_revinclude=Provenance:target` + * It may be provided with the `_id` or `patient` parameters. Example: `_id=214938095&_revinclude=Provenance:target` + +* When `_revinclude` is provided in a request to the closed endpoint, the OAuth2 token must include the scope corresponding to the Authorization Type, such as `user/Provenance.read`, `patient/Provenance.read` or `system/Provenance.read`. ### Headers @@ -96,6 +102,26 @@ Notes: <%= disclaimer %> +### Example Search by _id with RevInclude + + +### Authorization Types + +<%= authorization_types(provider: true, patient: true, system: true) %> + + +### Headers + +<%= headers %> +#### Request + + GET https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/NutritionOrder?_id=328575687,328575703&_revinclude=Provenance:target + +#### Response + +<%= headers status: 200 %> +<%= json(:R4_NUTRITION_ORDER_SEARCH_BY_REVINCLUDE) %> +<%= disclaimer %> ### Errors diff --git a/lib/resources/example_json/r4_examples_nutrition_order.rb b/lib/resources/example_json/r4_examples_nutrition_order.rb index 95fc0f217..0b8c45fe3 100644 --- a/lib/resources/example_json/r4_examples_nutrition_order.rb +++ b/lib/resources/example_json/r4_examples_nutrition_order.rb @@ -798,5 +798,700 @@ module Resources }, "dateTime": '2021-05-03T09:35:56.000-05:00' }.freeze + + R4_NUTRITION_ORDER_SEARCH_BY_REVINCLUDE ||= { + "resourceType": 'Bundle', + "id": 'abe88314-6e3e-4452-9da3-0ab877e90a4b', + "type": 'searchset', + "link": [ + { + "relation": 'self', + "url": 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/NutritionOrder?_id=328575687%2C328575703&_revinclude=Provenance%3Atarget' + } + ], + "entry": [ + { + "fullUrl": 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/NutritionOrder/328575687', + "resource": { + "resourceType": 'NutritionOrder', + "id": '328575687', + "meta": { + "versionId": '2', + "lastUpdated": '2021-05-03T14:37:55Z' + }, + "text": { + "status": 'generated', + "div": '

Nutrition Order"\ + "

Patient: SMART II, NANCY

Status: Active"\ + "

Intent: Order

Date: May 3, 2021 2:30 P"\ + ".M. UTC

Orderer: CERNER, CERNER CERNER

Diet Type: "\ + "Bland Diet

Diet Instruction: 05/03/21 9:30:00 CDT, Start Meal: "\ + "Now, Vegetarian diet, Gluten Free, 2000 kcal, Medium (1,700-2,000 "\ + "cal) 75g CHO, Low, 24 Hour Fluid Permitted 2000 mL, NDD3 (Chopped), "\ + "Thin Liquid, No free water, keep sodium to a minimum., Anemia due to "\ + "membrane defect

' + }, + "status": 'active', + "intent": 'order', + "patient": { + "reference": 'Patient/12724066', + "display": 'SMART II, NANCY' + }, + "encounter": { + "reference": 'Encounter/97959185' + }, + "dateTime": '2021-05-03T14:30:52Z', + "orderer": { + "reference": 'Practitioner/2', + "display": 'CERNER, CERNER CERNER' + }, + "foodPreferenceModifier": [ + { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6102', + "code": '658488', + "display": 'Vegetarian diet', + "userSelected": true + } + ], + "text": 'Vegetarian diet' + } + ], + "oralDiet": { + "type": [ + { + "coding": [ + { + "system": 'http://snomed.info/sct', + "code": '38226001', + "display": 'Bland diet (finding)', + "userSelected": false + } + ], + "text": 'Bland Diet' + } + ], + "schedule": [ + { + "repeat": { + "boundsPeriod": { + "start": '2021-05-03T14:30:00Z' + } + } + } + ], + "nutrient": [ + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/100194', + "code": '31168891', + "display": 'Medium (1,700-2,000 cal) 75g CHO', + "userSelected": true + } + ], + "text": 'Medium (1,700-2,000 cal) 75g CHO' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/100196', + "code": '31170565', + "display": '1000 mg phosphorus', + "userSelected": true + } + ], + "text": '1000 mg phosphorus' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6113', + "code": '658536', + "display": '2000 kcal', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '76426001', + "display": 'Calorie diet (finding)', + "userSelected": false + } + ], + "text": '2000 kcal' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6114', + "code": '658544', + "display": '2000 mL', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '33463005', + "display": 'Liquid substance (substance)', + "userSelected": false + } + ], + "text": '2000 mL' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6116', + "code": '31170379', + "display": '1.5 g sodium', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '39972003', + "display": 'Sodium (substance)', + "userSelected": false + } + ], + "text": '1.5 g sodium' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6117', + "code": '658565', + "display": 'Low', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '226887002', + "display": 'Fat and oil (substance)', + "userSelected": false + } + ], + "text": 'Low' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6118', + "code": '658567', + "display": '2 g potassium', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '88480006', + "display": 'Potassium (substance)', + "userSelected": false + } + ], + "text": '2 g potassium' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6119', + "code": '658576', + "display": '60 g protein', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '735252001', + "display": 'Protein and/or protein derivative (substance)', + "userSelected": false + } + ], + "text": '60 g protein' + } + } + ], + "texture": [ + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/100197', + "code": '31170633', + "display": 'NDD3 (Chopped)', + "userSelected": true + } + ], + "text": 'NDD3 (Chopped)' + } + } + ], + "fluidConsistencyType": [ + { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/100123', + "code": '25442691', + "display": 'Thin Liquid', + "userSelected": true + } + ], + "text": 'Thin Liquid' + } + ], + "instruction": '05/03/21 9:30:00 CDT, Start Meal: Now, Vegetarian diet"/ + ", Gluten Free, 2000 kcal, Medium (1,700-2,000 cal) 75g CHO, Low, 24 "/ + "Hour Fluid Permitted 2000 mL, NDD3 (Chopped), Thin Liquid, No free "/ + "water, keep sodium to a minimum., Anemia due to membrane defect' + }, + "note": [ + { + "text": 'Order comments' + } + ] + }, + "search": { + "mode": 'match' + } + }, + { + "fullUrl": 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/NutritionOrder/328575703', + "resource": { + "resourceType": 'NutritionOrder', + "id": '328575703', + "meta": { + "versionId": '1', + "lastUpdated": '2021-05-03T14:38:20Z' + }, + "text": { + "status": 'generated', + "div": '

Nutrition"\ + " Order

Patient: SMART II, NANCY

Status"\ + ": Entered in Error

Intent: Order

Date"\ + ": May 3, 2021 2:35 P.M. UTC

Orderer: CERNER, "\ + "CERNER CERNER

Diet Type: Cardiac Diet

Diet"\ + " Instruction: 05/03/21 9:35:00 CDT, Start Meal: Now, Disposable"\ + " dishes, Cardiac, 1800 kcal, Medium (1,700-2,000 cal) 75g CHO, "\ + "50 gm, 24 Hour Fluid Permitted 2000 mL, NDD3 (Chopped), Nectar "\ + "Thick, special instructions, Anemia due to membrane defect

' + }, + "status": 'entered-in-error', + "intent": 'order', + "patient": { + "reference": 'Patient/12724066', + "display": 'SMART II, NANCY' + }, + "encounter": { + "reference": 'Encounter/97959185' + }, + "dateTime": '2021-05-03T14:35:56Z', + "orderer": { + "reference": 'Practitioner/2', + "display": 'CERNER, CERNER CERNER' + }, + "foodPreferenceModifier": [ + { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6102', + "code": '658483', + "display": 'Disposable dishes', + "userSelected": true + } + ], + "text": 'Disposable dishes' + } + ], + "oralDiet": { + "type": [ + { + "text": 'Cardiac Diet' + } + ], + "schedule": [ + { + "repeat": { + "boundsPeriod": { + "start": '2021-05-03T14:35:00Z', + "end": '2021-05-03T14:38:00Z' + } + } + } + ], + "nutrient": [ + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/100194', + "code": '31168891', + "display": 'Medium (1,700-2,000 cal) 75g CHO', + "userSelected": true + } + ], + "text": 'Medium (1,700-2,000 cal) 75g CHO' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/100196', + "code": '31170565', + "display": '1000 mg phosphorus', + "userSelected": true + } + ], + "text": '1000 mg phosphorus' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6113', + "code": '658535', + "display": '1800 kcal', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '76426001', + "display": 'Calorie diet (finding)', + "userSelected": false + } + ], + "text": '1800 kcal' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6114', + "code": '658544', + "display": '2000 mL', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '33463005', + "display": 'Liquid substance (substance)', + "userSelected": false + } + ], + "text": '2000 mL' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6116', + "code": '31170379', + "display": '1.5 g sodium', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '39972003', + "display": 'Sodium (substance)', + "userSelected": false + } + ], + "text": '1.5 g sodium' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6117', + "code": '658560', + "display": '50 gm', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '226887002', + "display": 'Fat and oil (substance)', + "userSelected": false + } + ], + "text": '50 gm' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6118', + "code": '31170471', + "display": '1.5 g potassium', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '88480006', + "display": 'Potassium (substance)', + "userSelected": false + } + ], + "text": '1.5 g potassium' + } + }, + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/6119', + "code": '658574', + "display": '40 g protein', + "userSelected": true + }, + { + "system": 'http://snomed.info/sct', + "code": '735252001', + "display": 'Protein and/or protein derivative (substance)', + "userSelected": false + } + ], + "text": '40 g protein' + } + } + ], + "texture": [ + { + "modifier": { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/100197', + "code": '31170633', + "display": 'NDD3 (Chopped)', + "userSelected": true + } + ], + "text": 'NDD3 (Chopped)' + } + } + ], + "fluidConsistencyType": [ + { + "coding": [ + { + "system": 'https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/100123', + "code": '25442703', + "display": 'Nectar Thick', + "userSelected": true + } + ], + "text": 'Nectar Thick' + } + ], + "instruction": '05/03/21 9:35:00 CDT, Start Meal: Now, Disposable"\ + " dishes, Cardiac, 1800 kcal, Medium (1,700-2,000 cal) 75g CHO,"\ + " 50 gm, 24 Hour Fluid Permitted 2000 mL, NDD3 (Chopped), "\ + "Nectar Thick, special instructions, Anemia due to membrane defect' + }, + "note": [ + { + "text": 'Order comments' + } + ] + }, + "search": { + "mode": 'match' + } + }, + { + "fullUrl": 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Provenance/NUT-INT.med-328575687', + "resource": { + "resourceType": 'Provenance', + "id": 'NUT-INT.med-328575687', + "meta": { + "versionId": '328575687', + "lastUpdated": '2021-05-03T14:37:55Z' + }, + "text": { + "status": 'generated', + "div": '

"\ + "Provenance

Target:

Recorded: May 3, 2021 2:37 P.M."\ + " UTC

Agents:

Spence, Open Platform IA,"\ + " Stephen
Agent Type: Author
Agent Role"\ + ": Source
Model Clinic 1
Agent Type:"\ + " Author
Agent Role: Source
' + }, + "target": [ + { + "reference": 'NutritionOrder/328575687' + } + ], + "recorded": '2021-05-03T14:37:55Z', + "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": 'Practitioner/12724064', + "display": 'Spence, Open Platform IA, Stephen' + }, + "onBehalfOf": { + "reference": 'Organization/685844', + "display": 'Model Clinic 1' + } + }, + { + "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/685844', + "display": 'Model Clinic 1' + } + } + ] + }, + "search": { + "mode": 'include' + } + }, + { + "fullUrl": 'https://fhir-ehr.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d/Provenance/NUT-INT.med-328575703', + "resource": { + "resourceType": 'Provenance', + "id": 'NUT-INT.med-328575703', + "meta": { + "versionId": '328575703', + "lastUpdated": '2021-05-03T14:38:20Z' + }, + "text": { + "status": 'generated', + "div": '

"\ + "Provenance

Target:

Recorded: May 3, 2021 2:38 P.M."\ + " UTC

Agents:

Spence, Open Platform IA,"\ + " Stephen
Agent Type: Author
Agent"\ + " Role: Source
Model Clinic 1
Agent Type"\ + ": Author
Agent Role: Source
' + }, + "target": [ + { + "reference": 'NutritionOrder/328575703' + } + ], + "recorded": '2021-05-03T14:38:20Z', + "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": 'Practitioner/12724064', + "display": 'Spence, Open Platform IA, Stephen' + }, + "onBehalfOf": { + "reference": 'Organization/685844', + "display": 'Model Clinic 1' + } + }, + { + "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/685844', + "display": 'Model Clinic 1' + } + } + ] + }, + "search": { + "mode": 'include' + } + } + ] + }.freeze end end