OH.userLogin Event

Context Optionality Description
Key: organization Required FHIR Organization resource describing the user’s ‘under authority of’ (UAO) organization.
Key: location Optional FHIR Location resource describing the physicial work location of the user if it is different from the address of the organization.
Key: practitioner Required if the user is a regulated practitioner FHIR Practitioner resource describing the user if he/she is a regulated practitioner.
Key: parameters Required The following Parameters are required:
.appLanguage: the display language of the launching app.

Sample POST Request (JSON):

This specification only supports JSON format

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 used to recognize retried notifications. This id SHALL be unique for the Hub, for example a GUID
event Required object A JSON object describing the event. See below
Field Optionality Type Description
hub.topic Required string The uri of user's session that the subscriber wishes to subscribe to or unsubscribe from
hub.event Required string Comma separated list of event types from the Event Catalog for which the Subscriber wants notification
context Required string An array of named FHIR objects corresponding to the user's context after the given event has occurred. The hub MUST only return FHIR resources that can be accessed with the existing OAuth2 access_token.

{
  "timestamp": "2019-01-08T01:37:05.14Z",
  "id": "q9v3jubddqt63n3",
  "event": {
    "hub.topic": "7jaa86kgdudewiaq0wta",
    "hub.event": "OH.userLogin",
    "context": [
    {
        "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": "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, Bay 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": "example-cms-location",
          "meta":{
          "profile": 
          [
          "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-cms-profile-Location|1.0.0"  
          ]      
    },
          "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": [
        "SW Neuro 1",
        "aile sud Neuro OU 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": "work",
              "type": "physical",
              "line":  ["13 Boring St"],
              "city": "Toronto",
              "state": "ON",
              "postalCode": "M1M M2M",
              "country": "CAN"
            },

          "managingOrganization": {
          "reference": "Organization/xyz"
          }
        }
      },
      {
        "key": "parameters",
        "resource": {
          "resourceType": "Parameters",
          "id": "7336f5e9-b484-4e2e-9669-9491dd99ce3f",
          "meta": {
          "profile": 
          [
          "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-cms-profile-Parameters|1.0.0"
          ]
             },
          "parameter": [
            {
              "name": "appLanguage",
              "valueCoding": {
                "system": "urn:ietf:bcp:47",
                "code": "en"
              }
            }
          ]
        }
      }
    ]
  }
}