gitlab_slade360emr_com_sha-edi_hie-middleware_internal_dto.ConsentRequestInput
cr_idClient Registry (CR) identifier of the patient whose records the consent covers. For a dependant request this stays the dependant's identifier; the representative is named separately.
facility_idFacility Registry (FR) code of the facility requesting consent.
requested_byName or role of the person requesting consent. Recorded on the consent audit trail.
visit_typeType of visit the consent is being requested for. OP for outpatient, IP for inpatient.
emergencySet to 1 for an emergency consent, where the patient is incapacitated and consent cannot be collected at the point of care. incapacity_reason is required alongside it. An emergency consent is approved immediately, so the response carries the visit id and consent token rather than an OTP record.
incapacity_reasonWhy the patient cannot consent for themselves. Required for an emergency consent, and for a dependant request where patient_capable is 0 and the patient is an adult.
patient_capableSet to 0 when the patient cannot consent for themselves, for example an incapacitated adult. Defaults to 1. When 0, representative_cr_id is required, and incapacity_reason is required as well unless the patient is a minor.
practitioner_idPractitioner Unique Identifier (PUID) of the clinician requesting consent. Send this on every request - the Consent Management Platform expects it, even though the HIE does not reject a request without it.
representative_cr_idClient Registry identifier of the principal consenting on the patient's behalf. Provide it whenever cr_id refers to a dependant - a minor, or a patient with patient_capable set to 0. The consent request and its OTP are then routed to the representative, who becomes the record's principal.
representative_relationshipHow the representative relates to the patient. Required whenever representative_cr_id is provided.
start_dateDate the visit starts, as YYYY-MM-DD. Defaults to the date the consent is created.
internal_domain_shr.ConsentRequestResponse
consent_idIdentifier of the consent request. Supply it on the verify, status and resend-otp calls.
consent_statusCurrent state of the consent request as reported by DHA, for example Pending while the patient has not yet entered the OTP, or Approved for an emergency consent.
consent_tokenPer-visit token used to read patient records. Returned only for an emergency consent, which is approved without a password.
emergencyWhether this consent was granted through the emergency route.
messageHuman readable outcome message from DHA.
otp_recordOTP record reference. Send it back with the OTP when verifying the consent. Absent on an emergency consent, which needs no password.
statusOutcome status reported by DHA.
visit_idIdentifier of the visit the consent opened. Returned only for an emergency consent; on a standard consent the visit id arrives with the verification.
visit_typeType of visit the consent was requested for.
gitlab_slade360emr_com_sha-edi_hie-middleware_internal_dto.ErrorResponse
errorHTTP status text from the standard HTTP status codes.
messageDetailed error message explaining what went wrong.
trace_idTrace id for the request. Quote it when reporting an issue so the request can be located.
gitlab_slade360emr_com_sha-edi_hie-middleware_internal_dto.ConsentVerifyInput
agentIdentifier of the agent or channel performing the verification. Resolved from the request headers when omitted.
consent_decisionThe patient's decision. Accepts Approve or Reject, or their numeric forms 1 and 0. Treated as an approval when omitted.
geo_distance_kmDistance in kilometres between where consent was captured and the facility. Captured on the Afyayangu channel.
geo_latLatitude of the location where consent was captured. Captured on the Afyayangu channel.
geo_lonLongitude of the location where consent was captured. Captured on the Afyayangu channel.
otpOne-time password the patient received from DHA. Required on the OTP channel.
otp_recordOTP record reference. Use the value returned by the consent request to verify consent, or the value returned by Close Visit to complete an OTP-gated closure. Required on the OTP channel.
rejection_reasonWhy the patient refused consent. Required when consent_decision records a refusal.
internal_domain_shr.VerifyConsentResponse
consent_idIdentifier of the consent that was decided. Returned on refusals and on approvals captured off the one-time password channel.
consent_statusState the consent settled into, for example Approved or Rejected. Returned alongside consent_id.
consent_tokenPer-visit token used to read patient records. Send it in the X-Consent-Token header. Issued on an approval through the one-time password channel; a closure verification does not issue one.
end_dateDate the visit closed. Returned only when this verification completed an OTP-gated visit closure.
messageHuman readable outcome message from DHA.
statusOutcome status reported by DHA.
visit_idIdentifier of the visit the approved consent opened.
internal_domain_shr.ConsentStatusResponse
consent_idIdentifier of the consent request being polled.
consent_statusCurrent state of the consent request as reported by DHA, for example Pending or Approved.
messageHuman readable outcome message from DHA.
statusOutcome status reported by DHA.
visit_idIdentifier of the visit opened against the approved consent. Use it to refresh consent or to close the visit.
internal_domain_shr.ResendOTPResponse
consent_idIdentifier of the consent request the OTP was resent for.
consent_statusCurrent state of the consent request as reported by DHA.
messageHuman readable outcome message from DHA.
otp_recordOTP record reference for the newly issued OTP. Use this value, not the earlier one, when verifying the consent.
statusOutcome status reported by DHA.
visit_typeType of visit the consent was requested for.
internal_domain_shr.RefreshConsentResponse
consent_tokenRefreshed per-visit consent token. Replace the token you were using and send this one in the X-Consent-Token header.
messageHuman readable outcome message from DHA.
statusOutcome status reported by DHA.
gitlab_slade360emr_com_sha-edi_hie-middleware_internal_dto.CloseVisitInput
incapacity_reasonWhy the patient cannot consent to the closure. Required when patient_incapable is 1.
patient_incapableSet to 1 when the patient cannot consent to closing the visit - for example unconscious or deceased. The visit then closes immediately, with no one-time password sent or required.
internal_domain_shr.CloseVisitResponse
consent_idIdentifier of the consent request the closed visit belonged to.
end_dateDate the visit was closed. Returned on an immediate closure.
messageHuman readable outcome message from DHA.
otp_recordOTP record reference for a closure awaiting verification. Send it, with the password the performer received, to Verify Consent OTP to complete the closure.
statusOutcome status reported by DHA.
visit_idIdentifier of the visit that was closed.
internal_domain_shr.OpenVisit
visit_idIdentifier of the open visit. Use it to refresh the consent token for the visit or to close it.
internal_domain_shr.OpenVisitsResponse
messageHuman readable outcome message from DHA.
statusOutcome status reported by DHA.
Visits with an open consent. An empty array means the patient has no open visit at this facility, so a fresh consent request is needed.
internal_domain_shr.SubmitBundleResponse
mediator_idThe id of the bundle you submitted, echoed back so you can correlate this acknowledgement with the submission. Quote it when following up.
messageHuman readable outcome message from DHA.
statusOutcome status reported by DHA.

