Transaction | Query for current context |
---|---|
Description | Returns context information based on the context topic and context key (e.g. patient) |
HTTP Context | GET |
HTTP Response Codes | 200 OK: Valid session for parameters provided in the request 400 Bad Request 404 Not Found: Invalid Session for parameters provided in the request 500 Internal Server Error |
Note: To support ‘Query for Current Context’, the CMS iGuide uses FHIRcast May 2019 Ballot version - http://fhircast.org/specification/May2019Ballot/
Field | Optionality | Type | Description |
---|---|---|---|
hub.topic | Required | String | The uri of the user's session that the subscriber wishes to subscribe to or unsubscribe from. The hub.topic is created by CMS via createHubTopic call. |
Field | Optionality | Type | Description |
---|---|---|---|
timestamp | Required | string | ISO 8601-2 timestamp in UTC describing the time at which the event occurred with subsecond accuracy. |
id | Required | string | Event identifier, which MAY be used to recognize retried notifications. This id SHALL be uniquely generated by the subscriber and could be a GUID. |
event | Required | object | A JSON object describing the event. See the table below: |
Field | Optionality | Type | Description |
---|---|---|---|
hub.topic | Required | String | The session topic given in the subscription request. In phase 1, It will be a uuid generated by the launching app (e.g. EMR) |
context | Required | array | An array of named FHIR objects corresponding to the user's context after the given event has occurred. Currently CMS supports Patient, Practitioner, Location, Organization and Parameters resource. The hub SHALL only return FHIR resources that are authorized to be accessed with the existing OAuth 2.0 access_token. |
Examples:
Sample GET Request – Not Found:
GET [base]/7jaa86kgdudewiaq0wtu
HTTP/1.1 404 Not Found
Cache-Control: private
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
Sample GET Request – Found (JSON):
GET [base]/7jaa86kgdudewiaq0wtu
Authorization: Bearer i8hweunweunweofiwweoijewiwe
X-Request-Id - 3640dd516011da0243e26ce2
X-Gtwy-Client-Id - 2ff512d5865fb2a458078d40cb56c0b9
X-Gtwy-Client-Secret - 68317438049a8be42dfa8a35509813d1
{
"timestamp": "2018-04-23T10:43:00",
"id": "7jaa86kgdudewiaq0wtu",
"event": {
"hub.topic": "7jaa86kgdudewiaq0wtu",
"context": [
{
"key": "patient",
"resource": {
"resourceType": "Patient",
"id": "cms-patient-example",
"meta": {
"profile": ["http://ehealthontario.ca/fhir/StructureDefinition/ca-on-cms-profile-Patient|1.0.0"]
},
"identifier": [
{
"system": "https://infoway-inforoute.ca/fhir/NamingSystem/ca-on-patient-hcn",
"value": "1234567890"
},
{
"system": "http://ehealthontario.ca/fhir/NamingSystem/ca-on-panorama-immunization-id",
"value": "1244566"
}
],
"name": [
{
"use": "official",
"family": "Onsmith",
"given": ["Onjohn"]
}
],
"telecom": [
{
"system": "phone",
"value": "416-123-3456"
}
],
"gender": "male",
"birthDate": "1926-02-24",
"address": [
{
"use": "home",
"type": "physical",
"line": ["13 Boring St"],
"city": "Toronto",
"state": "ON",
"postalCode": "M1M M2M",
"country": "CAN"
}
]
}
},
{
"key": "practitioner",
"resource": {
"resourceType": "Practitioner",
"id": "example-cms-practitioner",
"meta": {
"profile": ["http://ehealthontario.ca/fhir/StructureDefinition/ca-on-cms-profile-Practitioner|1.0.0"]
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Hospital XYZ, Bat Street, second floor, Neuro Radiology Operation Room 1</div>"
},
"identifier": [
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "RRI"
}
],
"text": "eHealth PPR UPI"
},
"system": "http://ehealthontario.ca/fhir/NamingSystem/upi",
"value": "24"
},
{
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "LN"
}
],
"text": "Ontario Medical License Number"
},
"system": "http://infoway-inforoute.ca/fhir/NamingSystem/ca-on-license-physician",
"value": "24"
}
],
"name": [
{
"use": "official",
"family": "FeelGood",
"given": ["Joseph"],
"prefix": "Dr.",
"suffix": [
"III",
"PhD",
"MD"
],
}
],
"telecom": [
{
"system": "email",
"value": "joseph.jfeelgood@oneid.on.ca",
"use": "work"
},
{
"system": "phone",
"value": "647.742.5041",
"use": "home"
},
{
"system": "phone",
"value": "905.638.2345",
"use": "work"
}
],
"address": [
{
"line": ["514 Bay Street"],
"city": "Toronto",
"state": "ON",
"postalCode": "M1X 2B6"
}
],
"gender": "male",
"birthDate": "1975-07-30"
}
},
{
"key": "location",
"resource": {
"resourceType": "Location",
"id": "cms-location",
"meta": {
"profile": ["http://ehealthontario.ca/fhir/StructureDefinition/ca-on-cms-profile-Location|1.0.0"]
},
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Hospital XYZ, South Wing, second floor, Neuro Radiology Operation Room 1</div>"
},
"identifier": [
{
"system": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-provider-upi",
"value": "LOC 1"
}
],
"status": "suspended",
"operationalStatus": {
"system": "http://terminology.hl7.org/CodeSystem/v2-0116",
"code": "H",
"display": "Housekeeping"
},
"name": "South Wing Neuro OR 1",
"_alias": [
{
"extension": [
{
"url": "http://ehealthontario.on.ca/fhir/StructureDefinition/cms-ext-OrganizationNameType",
"valueCoding": {
"system": "http://ehealthontario.ca/fhir/CodeSystem/cms-organization-name-type",
"code": "short-name",
"display": "Short Name"
}
}
]
},
{
"extension": [
{
"url": "http://ehealthontario.on.ca/fhir/StructureDefinition/cms-ext-human-language",
"valueCoding": {
"system": "urn:ietf:bcp:47",
"code": "fr",
"display": "French"
}
}
]
}
],
"description": "Old South Wing, Neuro Radiology Operation Room 1 on second floor",
"mode": "instance",
"telecom": [
{
"system": "phone",
"value": "416-123-3456"
}
],
"address": {
"use": "home",
"type": "physical",
"line": ["13 Boring St"],
"city": "Toronto",
"state": "ON",
"postalCode": "M1M M2M",
"country": "CAN"
},
"managingOrganization": {
"reference": "Organization/xyz"
}
}
},
{
"key": "organization",
"resource": {
"resourceType": "Organization",
"id": "example-cms-organization",
"meta": {
"versionId": "23",
"profile": ["http://ehealthontario.ca/fhir/StructureDefinition/ca-on-cms-profile-Organization|1.0.0"]
},
"identifier": [
{
"system": "https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-provider-upi",
"value": "1234567890123"
}
],
"name": "XYZ Ear,Nose,Throat unit",
"alias": [
"ENT Unit",
"XYZ Unité pour les oreilles, le nez et la gorge"
],
"_alias": [
{
"extension": [
{
"url": "http://ehealthontario.on.ca/fhir/StructureDefinition/cms-ext-OrganizationNameType",
"valueCoding": {
"system": "http://ehealthontario.ca/fhir/CodeSystem/cms-organization-name-type",
"code": "short-name"
}
}
]
},
{
"extension": [
{
"url": "http://ehealthontario.on.ca/fhir/StructureDefinition/cms-ext-human-language",
"valueCoding": {
"system": "urn:ietf:bcp:47",
"code": "fr"
}
}
]
}
],
"telecom": [
{
"system": "phone",
"value": "416-655 6780"
}
],
"address": [
{
"use": "work",
"type": "physical",
"line": [
"North Wing, floor 10",
"123 Some Street"
],
"city": "Toronto",
"state": "ON",
"postalCode": "M1M 1M1",
"country": "CAN"
}
]
}
},
{
"key": "parameters",
"resource": {
"resourceType": "Parameters",
"id": "cms-parameters-example",
"meta": {
"profile": ["http://ehealthontario.ca/fhir/StructureDefinition/ca-on-cms-profile-Parameters|1.0.0"]
},
"parameter": [
{
"name": "consentTarget",
"valueString": "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-profile-MedicationDispense,http://ehealthontario.ca/fhir/StructureDefinition/ca-on-immunizations-profile-retrieval-clinician-Immunization"
},
{
"name": "appLanguage",
"valueCoding": {
"system": "urn:ietf:bcp:47",
"code": "en",
"display": "English"
}
},
{
"name": "contextSessionId",
"valueId": "7we9hfgt45jslsl0322dhyf"
}
]
}
}
]
}
}
Powered by SIMPLIFIER.NET