ResMed Core Implementation Guide
0.37.0 - ci-build
ResMed Core Implementation Guide - Local Development build (v0.37.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
This page describes how ACE Outcome resources can be added to CHP. The general workflow is outlined in the diagram while more details are provided in the following sections.
The ACE Device represents the current version of the software when new resources of Rule Plan Definition, Service Request, and Rule Outcome Observation are created. This workflow should be initiated as a first-time setup and whenever the ACE software version changes.
Has ACE been updated and has there been a Device resource (the FHIR resource representation of the ACE software version in this context) created for the version yet? ACE will need to be able to determine its software version and whether or not a Device resource exists for the current version.
It may be easier if the app is able to lookup the ACE Device resource by resource ID and compare the resource’s version ID with the current version without needing to make any requests to CHP. However, CHP can be queried for existing ACE Device resources to determine if there is a ACE Device resource for the current ACE version.
The ACE Device resource ID is needed to create new ACE Outcome resources.
Example Request
GET {API_URL}/Device/?device-name=AirView Compliance Engine&status=active
Example Response
Status: 200 OK
{
"resourceType": "Bundle",
"id": "e2fbae46-544d-4995-ab3c-d04e75142386",
"meta": {
"lastUpdated": "2023-03-03T02:37:39.272Z"
},
"type": "searchset",
"total": 3,
"link": [
{
"relation": "self",
"url": "https://api.dev.resmedchp.com/Device?_count=1&device-name=AirView%20Compliance%20Engine&status=active"
},
{
"relation": "next",
"url": "https://api.dev.resmedchp.com/Device?_count=1&device-name=AirView%20Compliance%20Engine&status=active&_getpagesoffset=1"
}
],
"entry": [
{
"search": {
"mode": "match"
},
"fullUrl": "https://api.dev.resmedchp.com/Device/d6f3fb76-6a90-4b8d-983d-c9d8b852a04c",
"resource": {
"type": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "706689003"
}
]
},
"deviceName": [
{
"name": "AirView Compliance Engine",
"type": "manufacturer-name"
}
],
"version": [
{
"type": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "531975"
}
]
},
"value": "1.2.3-j1"
}
],
"manufacturer": "ResMed Corp.",
"meta": {
"lastUpdated": "2023-02-23T15:04:25.965Z",
"versionId": "1",
"profile": [
"http://resmed.com/fhir/core/StructureDefinition/device-rmd-ace-engine"
]
},
"id": "d6f3fb76-6a90-4b8d-983d-c9d8b852a04c",
"resourceType": "Device",
"status": "active"
}
}
]
}
You may need to iterate through a list of returned devices to find the correct device resource. There may also need to be multiple requests for paginated results.
Record Response.entry[x].id if a record matches the version. Do not create a new resource for the current version since it already exists.
Note: Response.entry[x].version is an array, it needs to be filtered by type where it has a coding system of urn:iso:std:iso:11073:10101 and code of 531975
This step can be skipped if an ACE Device Resource already exists
Each version of ACE is saved as a Device resource in CHP. The resource ID obtained from posting a new version is used when adding new outcomes into CHP. There is currently no constraint that prevents two Device resources from being created for the same ACE version. Care must be taken to avoid creating multiple resources for the same version.
Example Request
POST {API_URL}/Device/
{
"resourceType" : "Device",
"meta" : {
"profile" : [
"http://resmed.com/fhir/core/StructureDefinition/device-rmd-ace-engine"
]
},
"status": "active",
"manufacturer": "ResMed Corp.",
"deviceName": [
{
"name": "AirView Compliance Engine",
"type": "manufacturer-name"
}
],
"type": {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "706689003"
}
]
},
"version": [
{
"type": {
"coding" : [
{
"system" : "urn:iso:std:iso:11073:10101",
"code" : "531975"
}
]
},
"value": "1.2.3-j1"
}
]
}
Example Response
Status: 201 Created
{
"resourceType": "Device",
"meta": {
"profile": [
"http://resmed.com/fhir/core/StructureDefinition/device-rmd-ace-engine"
],
"versionId": "1",
"lastUpdated": "2023-02-23T15:04:25.965Z"
},
"status": "active",
"manufacturer": "ResMed Corp.",
"deviceName": [
{
"name": "AirView Compliance Engine",
"type": "manufacturer-name"
}
],
"type": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "706689003"
}
]
},
"version": [
{
"type": {
"coding": [
{
"system": "urn:iso:std:iso:11073:10101",
"code": "531975"
}
]
},
"value": "1.2.3-j1"
}
],
"id": "d6f3fb76-6a90-4b8d-983d-c9d8b852a04c"
}
Record the Location header or Response.id as it is needed when submitting ACE Outcome resources. Consider persisting the resource ID with the ACE version so that you can easily lookup whether or not the current ACE version is associated with a resource ID.
There should only be one active ACE Device resource. Set all of the older ACE Device resources’ status to inactive after creating a new ACE Device resource. This can be done while iterating through all of the active ACE Devices in the previous step. CHP currently only supports using PUT to update existing resources. The whole resource must be present in the request with the updates status field as it will overwrite what is on the server.
Highlighted Request Values
Request.status = "inactive"
Example Request
PUT {API URL}/Device/{Resource ID}
{
"resourceType" : "Device",
"id": "9f80d17a-b1aa-4986-bfe6-36f264de918d",
"meta" : {
"profile" : [
"http://resmed.com/fhir/core/StructureDefinition/device-rmd-ace-engine"
]
},
"status": "inactive",
"manufacturer": "ResMed Corp.",
"deviceName": [
{
"name": "AirView Compliance Engine",
"type": "manufacturer-name"
}
],
"type": {
"coding" : [
{
"system" : "http://snomed.info/sct",
"code" : "706689003"
}
]
},
"version": [
{
"type": {
"coding" : [
{
"system" : "urn:iso:std:iso:11073:10101",
"code" : "531975"
}
]
},
"value": "1.2.3"
}
]
}
Rule plan definition resources are created for each of the the rules that are available for enrolment.
Example Request
POST {API_URL}/PlanDefinition/
{
"resourceType" : "PlanDefinition",
"meta" : {
"profile" : [
"http://resmed.com/fhir/core/StructureDefinition/rmd-rule-plandefinition"
]
},
"version" : "1.0.0",
"name": "HighCAIForThreeDaysOutOfFive",
"status" : "active",
"type": {
"coding" : [
{
"system" : "https://terminology.resmed.com/CodeSystem/resmed-plandefinition-type-identifier",
"code" : "rule"
}
]
},
"useContext" : [
{
"code" : {
"system" : "http://terminology.hl7.org/CodeSystem/usage-context-type",
"code" : "program"
},
"valueCodeableConcept" : {
"coding" : [
{
"system" : "https://terminology.resmed.com/CodeSystem/resmed-rule-implementer-identifier",
"code" : "ACE"
}
]
}
}
],
"action" : [
{
"trigger" : [
{
"type" : "data-added",
"data" : [
{
"type" : "Observation"
}
],
"condition" : {
"language" : "application/x.rmd-ace+json",
"expression" : "{\n \"name\": \"HighCAIForThreeDaysOutOfFive\",\n \"ruleId\": \"37fc6546-b750-413f-88b7-3877ad0bd099\",\n \"operator\": \">\",\n \"enabled\": true,\n \"alertName\": \"CAI_High\",\n \"days\": 5,\n \"isMedianRule\": false\n }"
}
}
]
}
]
}
Example Response
{
"resourceType": "PlanDefinition",
"id": "8f34c6cd-7ec4-4b72-bc0f-fa83f4b1e70f",
"meta": {
"profile": [
"http://resmed.com/fhir/core/StructureDefinition/rmd-rule-plandefinition"
],
"versionId": "14",
"lastUpdated": "2023-03-02T18:56:42.917Z"
},
"version": "1.0.0",
"name": "HighCAIForThreeDaysOutOfFive",
"status": "active",
"type": {
"coding": [
{
"system": "https://terminology.resmed.com/CodeSystem/resmed-plandefinition-type-identifier",
"code": "rule"
}
]
},
"useContext": [
{
"code": {
"system": "http://terminology.hl7.org/CodeSystem/usage-context-type",
"code": "program"
},
"valueCodeableConcept": {
"coding": [
{
"system": "https://terminology.resmed.com/CodeSystem/resmed-rule-implementer-identifier",
"code": "ACE"
}
]
}
}
],
"action": [
{
"trigger": [
{
"type": "data-added",
"data": [
{
"type": "Observation"
}
],
"condition": {
"language": "application/x.rmd-ace+json",
"expression": "{\n \"name\": \"HighCAIForThreeDaysOutOfFive\",\n \"ruleId\": \"37fc6546-b750-413f-88b7-3877ad0bd099\",\n \"operator\": \">\",\n \"enabled\": true,\n \"alertName\": \"CAI_High\",\n \"days\": 5,\n \"isMedianRule\": false\n }"
}
}
]
}
]
}
The Location header or the Response.id is used in the next step when creating the Rule Service Request
Create a Rule Service Request resource whenever a patient is enrolled to an ACE Rule. These resources are associated to a Rule Plan Definition resource.
Highlighted Request Values
Request.instantiatesCanonical[x] = "{API_URL}/PlanDefinition/{Rule Plan Definition resource ID}"
Request.subject = "Patient/{Resource ID (AirView patient ID)}"
Request.performer[y] = "Device/{ACE Device Resource ID}"
Example Request
POST {API_URL}/ServiceRequest/
{
"resourceType" : "ServiceRequest",
"id": "fa3b74ea-10db-422a-9f54-d57597c11a54",
"meta" : {
"profile" : [
"http://resmed.com/fhir/core/StructureDefinition/resmed-rules-service-request"
]
},
"identifier" : [
{
"system" : "urn:ietf:rfc:3986",
"value" : "urn:uuid:9dd30140-46ae-480c-bac6-c3be6addf3fa"
}
],
"instantiatesCanonical": [
"/PlanDefinition/8f34c6cd-7ec4-4b72-bc0f-fa83f4b1e70f"
],
"status": "active",
"intent": "plan",
"code": {
"coding" : [
{
"system" : "https://terminology.resmed.com/CodeSystem/resmed-rules-service-request-type",
"code" : "sully-rule"
}
]
},
"subject": {
"reference": "Patient/ca412f20-c13d-48c5-bd23-98f035056eed"
},
"performer": [
{
"reference": "Device/9f80d17a-b1aa-4986-bfe6-36f264de918d"
}
]
}
Example Response
{
"resourceType": "ServiceRequest",
"id": "fa3b74ea-10db-422a-9f54-d57597c11a54",
"meta": {
"profile": [
"http://resmed.com/fhir/core/StructureDefinition/resmed-rules-service-request"
],
"versionId": "7",
"lastUpdated": "2023-03-03T01:55:25.712Z"
},
"identifier": [
{
"system": "urn:ietf:rfc:3986",
"value": "urn:uuid:9dd30140-46ae-480c-bac6-c3be6addf3fa"
}
],
"instantiatesCanonical": [
"https://api.dev.resmedchp.com/PlanDefinition/8f34c6cd-7ec4-4b72-bc0f-fa83f4b1e70f"
],
"status": "active",
"intent": "plan",
"code": {
"coding": [
{
"system": "https://terminology.resmed.com/CodeSystem/resmed-rules-service-request-type",
"code": "sully-rule"
}
]
},
"subject": {
"reference": "Patient/ca412f20-c13d-48c5-bd23-98f035056eed"
},
"performer": [
{
"reference": "Device/9f80d17a-b1aa-4986-bfe6-36f264de918d"
}
]
}
Add Outcomes based on specific ACE rules for a patient in CHP.
This step can be skipped if the patient resource ID is already known.
Rule outcomes are associated with an existing patient by referencing the Patient resource ID. If ACE does not have the Patient resource ID for an AirView patient, it can be obtained by querying CHP using the AirView Patient ID (ECN) in a search.
Example Request
GET {API_URL}/Patient/?identifier={AirView patient ID}
Example Response
Status: 200 OK
{
"resourceType": "Bundle",
"id": "ccbc2f2e-29a4-4ef8-846e-28377abe77ec",
"meta": {
"lastUpdated": "2023-02-23T15:23:18.194Z"
},
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "https://api.dev.resmedchp.com/Patient?identifier=9d04972e-d290-483d-9bcf-6d14a6dd83e5"
}
],
"entry": [
{
"search": {
"mode": "match"
},
"fullUrl": "https://api.dev.resmedchp.com/Patient/07a857ff-aabb-40ca-8a15-641ad185e345",
"resource": {
"identifier": [
{
"system": "urn:uuid:9f8951a8-cfb6-11eb-b8bc-0242ac130003",
"use": "official",
"assigner": {
"display": "ResMed Corp."
},
"type": {
"coding": [
{
"system": "https://terminology.resmed.com/CodeSystem/resmed-user-identifier",
"code": "ECN"
}
]
},
"value": "9d04972e-d290-483d-9bcf-6d14a6dd83e5"
}
],
"birthDate": "1996-09-24",
"managingOrganization": {
"reference": "Organization/fdd36e70-1a14-47a3-b811-908b3e2f6fda"
},
"meta": {
"lastUpdated": "2022-07-12T20:35:52.204Z",
"versionId": "1",
"profile": [
"http://resmed.com/fhir/core/StructureDefinition/resmed-patient"
]
},
"name": [
{
"given": [
"John",
"James"
],
"family": "Henry"
}
],
"id": "07a857ff-aabb-40ca-8a15-641ad185e345",
"resourceType": "Patient"
}
}
]
}
Ensure that the correct patient is selected from the response in the event that more than one patient resource is returned with the same AirView patient ID. Record Response.entry[x].resource.id to be used in the next step when adding ACE rule outcomes. Consider persisting the patient resource ID along with the patient record within ACE.
Using the ID for the current ACE Device Resource and the ID for the patient
Highlighted Request Values
Request.basedOn[x].reference = "ServiceRequest/{Service Request ID}"
Request.subject.reference = "Patient/{Patient resource ID}"
Request.device.reference = "Device/{ACE current version Device resource ID}"
Example Request
POST {API_URL}/Observation
{
"resourceType" : "Observation",
"meta" : {
"profile" : [
"http://resmed.com/fhir/core/StructureDefinition/observation-rmd-rule-outcome"
]
},
"basedOn": [
{
"reference": "ServiceRequest/fa3b74ea-10db-422a-9f54-d57597c11a54"
}
],
"status": "final",
"category": [
{
"coding" : [
{
"system" : "http://terminology.resmed.com/CodeSystem/resmed-observation-category-code-system",
"code" : "rule-outcome"
}
]
},
{
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/observation-category",
"code" : "therapy"
}
]
}
],
"code": {
"coding" : [
{
"system" : "http://resmed.com/fhir/core/CodeSystem/rmd-ruleOutcomeTypes-cs",
"code" : "valveLeakHigh"
}
]
},
"subject": {
"reference": "Patient/ca412f20-c13d-48c5-bd23-98f035056eed"
},
"effectiveDateTime": "2023-02-23T15:12:17.856Z",
"issued": "2023-02-23T15:12:17.856Z",
"interpretation": [
{
"coding" : [
{
"system" : "http://resmed.com/fhir/core/CodeSystem/rmd-ruleOutcomeInterpretations-cs",
"code" : "alertActive"
}
]
}
],
"device": {
"reference": "Device/9f80d17a-b1aa-4986-bfe6-36f264de918d"
},
"component": [
{
"code": {
"coding" : [
{
"system" : "http://resmed.com/fhir/core/CodeSystem/rmd-ruleOutcomeComponent-cs",
"code" : "threshold"
}
]
},
"valueQuantity": {
"value": 5,
"comparator": ">",
"unit": "events/hour"
}
},
{
"code": {
"coding" : [
{
"system" : "http://resmed.com/fhir/core/CodeSystem/rmd-ruleOutcomeComponent-cs",
"code" : "compareValue"
}
]
},
"valueQuantity": {
"value": 3,
"comparator": ">=",
"unit": "days"
}
}
]
}
Example Response
Status: 201 Created
{
"resourceType": "Observation",
"meta": {
"profile": [
"http://resmed.com/fhir/core/StructureDefinition/observation-rmd-rule-outcome"
],
"versionId": "1",
"lastUpdated": "2023-02-23T15:12:18.614Z"
},
"basedOn": [
{
"reference": "ServiceRequest/fa3b74ea-10db-422a-9f54-d57597c11a54"
}
],
"status": "final",
"category": [
{
"coding" : [
{
"system" : "http://terminology.resmed.com/CodeSystem/resmed-observation-category-code-system",
"code" : "rule-outcome"
}
]
},
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "therapy"
}
]
}
],
"code": {
"coding": [
{
"system": "http://resmed.com/fhir/core/CodeSystem/rmd-ruleOutcomeTypes-cs",
"code": "valveLeakHigh"
}
]
},
"subject": {
"reference": "Patient/ca412f20-c13d-48c5-bd23-98f035056eed"
},
"effectiveDateTime": "2023-02-23T15:12:17.856Z",
"issued": "2023-02-23T15:12:17.856Z",
"interpretation": [
{
"coding": [
{
"system": "http://resmed.com/fhir/core/CodeSystem/rmd-ruleOutcomeInterpretations-cs",
"code": "alertActive"
}
]
}
],
"device": {
"reference": "Device/9f80d17a-b1aa-4986-bfe6-36f264de918d"
},
"component": [
{
"code": {
"coding": [
{
"system": "http://resmed.com/fhir/core/CodeSystem/rmd-ruleOutcomeComponent-cs",
"code": "threshold"
}
]
},
"valueQuantity": {
"value": 5,
"comparator": ">",
"unit": "events/hour"
}
},
{
"code": {
"coding": [
{
"system": "http://resmed.com/fhir/core/CodeSystem/rmd-ruleOutcomeComponent-cs",
"code": "compareValue"
}
]
},
"valueQuantity": {
"value": 3,
"comparator": ">=",
"unit": "days"
}
}
],
"id": "ea8b72cd-bc70-4e07-b6ac-e0b90131df8e"
}