Profiles & Operations > CreateDHDRPDF Operation
The CreateDHDRPDF operation is used to prepopulate a printable PDF to document a temporary consent override, as required by the Ontario Ministry of Health policies for DHDR. This is an extended operation as defined per the FHIR core specification (https://www.hl7.org/fhir/R4/operations.html).
This transaction involves sending a FHIR Consent resource to the CreateDHDRPDF endpoint of the PCOI microservice, to prepopulate and generate a printable PDF for the purpose of documenting a temporary consent override for DHDR. The PCOI microservice will provide a FHIR response message with a binary PDF attachment.
The following diagram illustrates the high level interaction between a FHIR PCOI Client and FHIR PCOI microservice. The transaction will use the following pair of query and response:
Actor: FHIR PCOI RESTful Client
Role: Prior to creating a Consent Override for DHDR, the PCOI Client must request a pre-populated PDF to document the temporary consent override, as per Ontario Ministry of Health policies for DHDR. A Consent FHIR resource will be sent, and the payload is identical to the Consent FHIR resource used for the actual Consent (Override) Create.
Actor: FHIR PCOI CreateDHDRPDF Microservice
Role: Processes the CreateDHDRPDF request message, and generates and returns a PDF prepopulated with the Consent Override information for the client's records
PCOI Request
PCOI Response
Endpoint (HTTP POST Only): [base]/fhir/Consent/$createDHDRPDF
Request Payload: Consent FHIR resource conforming to http://ehealthontario.ca/fhir/StructureDefinition/on-ca-consent-pcoi-profile-Consent
Response Payload: Binary FHIR resource conforming to http://ehealthontario.ca/fhir/StructureDefinition/on-ca-consent-pcoi-profile-Binary
The table below shows the allowed transactions for each profile and how they support FHIR endpoints, resources and their corresponding HTTP operations:
| Resource | Transaction | HTTP Operations | URL | Request Body Resource | Response Body Resource |
|---|---|---|---|---|---|
| N/A | Operation | POST | [base]/fhir/Consent/$createDHDRPDF | Consent resource with contained Patient, Practitioner, Organization, RelatedPerson resources | Binary resource |
The interaction summary table below lists the HTTP status codes that may be returned for the query.
| Interaction | Content-Type | Body | Location | Versioning | Status Codes | Comments | |
|---|---|---|---|---|---|---|---|
| create | R | R: | Consent | N/A | N/A | 201,400,404,406,415,500 |
The Accept-Language HTTP Header field will be used to identify the requested language of the generated PDF, either en (English) or fr (French).
For additional information on other HTTP Header Fields, see
Examples of $CreateDHDRPDF request bodies:
Example of a $CreateDHDRPDF response:
example requests and responses are not intended to correspond to each other
| Case | Scenario Description | HTTP Status Code | Response Payload |
|---|---|---|---|
| 1 | PDF successfully created | HTTP 201 | Created. Returns the created binary. |
| 2 | PDF Field Not Found Error | HTTP 500 | OperationOutcome with "Could not find PDF field." |
| 3 | Business Validation Error | HTTP 400 | OperationOutcome with "HTTP Header does not match Consent Resource Id" |
| 4 | Invalid Message Content | HTTP 422 | OperationOutcome with "Invalid value: " |
For additional Response Handling guidance, please see Response Handling
Powered by SIMPLIFIER.NET