Profiles & Operations Index > Operation: Submit Patient Summary
Operation: Submit Patient Summary
The Submit Patient Summary operation is used to transfer a Patient Summary document and metadata to an Ontario Patient Summary Document Recipient. This encompasses both Create and Update. Update, as described below, is only used to invalidate an existing Patient Summary document.
Scope
This transaction involves a request by an Ontario Patient Summary Document Source to transfer a Patient Summary Bundle, including a Patient Summary Composition and linked resources, to an Ontario Patient Summary Document Recipient. The request is received by the Ontario Patient Summary Recipient which stores the received Bundle and returns an HTTP response code and an OperationOutcome resource if applicable.
For example, an Electronic Medical Record (EMR user updates a patient's record in the EMR, then the EMR extracts Patient Summary data for that patient from the patient's record and submits it to the provincial repository, where it is available for viewing by other Ontario Patient Summary Consumers.
Interaction Diagram
Actor: Ontario Patient Summary Document Source
Role: Submits Patient Summary document bundle containing a Patient Summary Composition and linked resources to the Ontario Patient Summary Document Recipient.
Actor: Ontario Patient Summary Document Recipient
Role: Receives and stores Patient Summary document Bundles from Ontario Patient Summary Document Sources.
Specification
This specification is based on the FHIR R4 Create and Update operations.
Patient Summary Create Request
The Create Request will create a new Patient Summary bundle based upon information available from the Ontario Patient Summary Document Source, if one does not already exist in the repository. If there is already an existing summary for the Patient + Health Information Custodian + Device triplet, the newly submitted version will replace the existing version in the repository.
POST [base]/Bundle/
Patient Summary Create Response
- OperationOutcome
Patient Summary Update Request
The Update Request will update an existing Patient Summary document, using the bundle identifier to match against the respective existing Patient Summary document in the repository
PUT [base]/Bundle?[search parameters]
e.g. PUT [base]/Bundle?identifier=http://myemr.ca/|119A8F3Q
where 'http://myemr.ca/|119A8F3Q' is the identifier of the originally submitted patient summary
The bundle business identifier (bundle.identifier) will be "search parameter" used to identify the patient summary document that will be updated in repository.
Patient Summary Amendment:
- Set Composition.status to 'amended' when submitting the update.
- If the repository finds an existing patient summary in the repository, the submitted patient summary document will logically replace the existing one in the repository
- If the repository does not find an existing matching patient summary, the repository will create a new record
Patient Summary Invalidation:
- Set Composition.status to 'entered-in-error' when submitting the update
- Once invalidated, the entire series of patient summary documents (using the same Bundle business identifier and Composition business identifier) will no longer be valid for use in the EHR. Future submissions of the corrected patient summary and its subsequent updates must use a new Bundle identifier and Composition identifier
Patient Summary Update Response
- OperationOutcome
Example Create Message
HTTP Method:
POST
Headers:
Content-Type: application/fhir+json
Address:
[base]/Bundle/
Message body:
{
"resourceType" : "Bundle",
"meta" : {
"lastUpdated" : "2021-12-11T14:30:00+01:00",
"profile" : [
"http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-bundle"
]
},
"identifier" : {
"system" : "http://ex-ps-identifier-system.org",
"value" : "urn:uuid:175bd032-8b00-4728-b2dc-748bb1501aed"
},
"type" : "document",
"timestamp" : "2021-12-11T14:30:00+01:00",
"entry" : [
{
"fullUrl" : "urn:uuid:d792b9de-b97a-4319-b34c-a3fe012ddfa2",
"resource" : {
"resourceType" : "Composition",
"id" : "d792b9de-b97a-4319-b34c-a3fe012ddfa2",
"identifier" : {
"system" : "urn:oid:2.16.724.4.8.10.200.10",
"value" : "0c625f31-6354-4625-baaf-09e8fe26eaef"
},
"status" : "final",
"type" : {
"coding" : [
{
"system" : "http://loinc.org",
"code" : "60591-5",
"display" : "Patient Summary Document"
}
]
},
...
Example Update Message
HTTP Method:
PUT
Headers:
Content-Type: application/fhir+json
Address:
[base]/Bundle/PSON-example-Bundle-03
Message body:
{
"resourceType" : "Bundle",
"id" : "PSON-example-Bundle-03",
"meta" : {
"lastUpdated" : "2021-12-11T14:30:00+01:00",
"profile" : [
"http://ontariohealth.ca/fhir/StructureDefinition/ca-on-ps-profile-bundle"
]
},
"identifier" : {
"system" : "http://ex-ps-identifier-system.org",
"value" : "urn:uuid:175bd032-8b00-4728-b2dc-748bb1501aed"
},
"type" : "document",
"timestamp" : "2021-12-11T14:30:00+01:00",
"entry" : [
{
"fullUrl" : "urn:uuid:d792b9de-b97a-4319-b34c-a3fe012ddfa2",
"resource" : {
"resourceType" : "Composition",
"id" : "d792b9de-b97a-4319-b34c-a3fe012ddfa2",
"identifier" : {
"system" : "urn:oid:2.16.724.4.8.10.200.10",
"value" : "0c625f31-6354-4625-baaf-09e8fe26eaef"
},
"status" : "entered-in-error",
"type" : {
"coding" : [
{
"system" : "http://loinc.org",
"code" : "60591-5",
"display" : "Patient Summary Document"
}
]
},
...
Expected Behavior
See Response Handling page for additional response handling behaviour.
Legend |
---|
code = OperationOutcome.issue.code |
severity = OperationOutcome.issue.severity |
details.coding.code=OperationOutcome.issue.details.coding.code |
details.coding.display=OperationOutcome.issue.details.coding.display |
details.text = OperationOutcome.issue.details.coding.text |
HTTP Status | Scenario Description | severity | code | details.coding.code | details.coding.display | details.text |
---|---|---|---|---|---|---|
200 OK | An update to an existing Patient Summary bundle is submitted in order to invalidate an existing Patient Summary. Returns the updated resource | |||||
201 Created | A new Patient Summary bundle is submitted. Returns the created resource | |||||
400 Bad Request | POST operation contains incorrect header value for "Content-Type" - should be "application/fhir+json" | error | invalid | |||
400 Bad Request | Missing security token | error | required | Missing required security token: PIN | ||
400 Bad Request | When there was syntactical error such as a missing or invalid header, a missing or invalid URL parameter, a request body that can't be parsed or doesn't conform to the basic FHIR JSON/XML syntax rules, etc | error | invalid | |||
406 Not Acceptable | The Accept header requested a format that the server does not support | error | not-supported | |||
401 Unauthorized | Failed authentication | error | security | Authorization is required for the interaction that was attempted | ||
422 Unprocessible Entity | FHIR validation errors such as invalid code, wrong date format, or violation of LOB defined business rules | Will vary depending on the error | Will vary depending on the error | OH-defined error code | OH-defined errror message | |
429 Too Many Requests | Rate Limit | error | throttled | Too Many Requests | ||
500 Internal Server Error | Unhandled Exception | fatal | exception | Internal Error | ||
503 Service Unavailable | Indicates that the services has been temporarily taken down (on purpose) | |||||
504 Gateway Timeout | Downstream system(s) did not return timely response | error | timeout | |||
401 Unauthorized | Failed to validate bundle.composition.custodian (i.e. organization) against UAO | error | security | |||
401 Unauthorized | Failed to validate bundle.entry.Organization against UAO | error | security | |||
409 Conflict | Rejected duplicate PS-ON submissions | error | processing | Can not create resource of type {resource} as it would create a duplicate unique index matching query {query} | ||
422 Content validation | Failed to validate provider name | error | business-rule | FHIR_PROV_2004 | Submitted provider name does not match the provider name in PPR | |
422 Content validation | Device identifier should be the Client ID supplied from OAG | error | business-rule | FHIR_DEVC_1000 | Submitted Device identifier does not match Client ID | |
422 Content validation | FHIR submissions must conform to the profiles defined in the OH Patient Summary FHIR IG | error | business-rule | FHIR_MD_1000 | <Populated from IG error description> |
|
422 Content validation | HCN must pass MOD-10 validation | error | business-rule | FHIR_PTNT_2001 | Invalid Ontario HCN | |
422 Content validation | HCN does not exist in PCR | warning | business-rule | FHIR_PTNT_2002 | HCN does not exist in PCR | |
422 Content validation | HCN should match only one patient in PCR | warning | business-rule | FHIR_PTNT_2003 | Multiple patients for provided HCN | |
422 Content validation | PCR patient must have DOB | error | business-rule | FHIR_PTNT_2004 | DOB does not exist in PCR | |
422 Content validation | Patient DOB must match PCR DOB | error | business-rule | FHIR_PTNT_2005 | DOB does not match PCR DOB | |
422 Content validation | Hospital MRN must be less than 40 characters | error | business-rule | FHIR_PTNT_2006 | Invalid MRN format | |
422 Content validation | Hospital MRN should exist in PCR | error | business-rule | FHIR_PTNT_2007 | MRN does not exist in PCR | |
422 Content validation | Hospital MRN should match only one patient in PCR | warning | business-rule | FHIR_PTNT_2008 | Multiple patients for provided MRN | |
422 Content validation | PCR system error | error | exception | FHIR_PTNT_2101 | System error while trying to validate against PCR | |
422 Content validation | Provider does not exist | error | business-rule | FHIR_PROV_2001 | Provider does not exist in PPR | |
422 Content validation | Provider/Organization is not active | warning | business-rule | FHIR_PROV_2002 | [Provider/Organization] is not active in PPR | |
422 Content validation | PPR system error | error | business-rule | FHIR_PROV_2101 | System error while trying to validate against PPR |