### Start Visit Request cURL Source: https://hie-docs.dha.go.ke/eclaims/start-visit-consent Example request to initiate a visit using the POST method. ```shell curl --request POST \ --url https://ilm-dev.dha.go.ke/uat-middleware/api/v1/claims/visit \ --header 'Content-Type: application/json' \ --data ' { "intervention_codes": [ "string" ], "patient_id": "CR2594484249725-2", "service_type": "CAPITATION", "otp": "123456", "practitioner_identification_type": "registration_number", "practitioner_identification_number": "A00000", "practitioner_regulation_body": "KMPDC" } ' ``` -------------------------------- ### Get access token response Source: https://hie-docs.dha.go.ke/auth/authentication Example JSON structure of the successful response containing the access token. ```json { "access_token": "access_token", "expires_in": 0, "token_type": "token_type" } ``` -------------------------------- ### Diagnosis response example Source: https://hie-docs.dha.go.ke/eclaims/billing Example JSON structure returned upon a successful diagnosis addition. ```json { "claim": "claim", "claim_diagnosis_id": 0, "diagnosis": "diagnosis", "diagnosis_code": "diagnosis_code", "diagnosis_name": "diagnosis_name", "edi_claim_diagnosis_guid": "edi_claim_diagnosis_guid", "edi_claim_diagnosis_replicated": "edi_claim_diagnosis_replicated", "intervention_code": "intervention_code", "is_flagged_diagnosis": true, "is_inpatient": true, "original_visit_date": "original_visit_date", "patient_number": "patient_number", "recorded_on": "recorded_on", "site_code": "site_code", "site_code_type": "site_code_type", "visit_number": "visit_number" } ``` -------------------------------- ### Get access token request body Source: https://hie-docs.dha.go.ke/auth/authentication Example JSON structure for the request body when authenticating. ```json { "client_id": "hie-integrator-client", "client_secret": "R4nd0m-Cl13nt-S3cr3t" } ``` -------------------------------- ### Claim attachment response example Source: https://hie-docs.dha.go.ke/eclaims/billing Example JSON response returned upon successfully adding a claim attachment. ```json { "attachment": "attachment", "attachment_type": "attachment_type", "claim": "claim", "data": "data", "debug_data": "debug_data", "description": "description", "id": "id", "intervention_code": "intervention_code", "last_retry": "last_retry", "retry_count": 0, "title": "title" } ``` -------------------------------- ### Example Request Body Source: https://hie-docs.dha.go.ke/eclaims/start-visit-consent The JSON structure required for the visit initiation request. ```json { "intervention_codes": [ "string" ], "patient_id": "CR2594484249725-2", "service_type": "CAPITATION", "otp": "123456", "practitioner_identification_type": "registration_number", "practitioner_identification_number": "A00000", "practitioner_regulation_body": "KMPDC" } ``` -------------------------------- ### Example Response Body Source: https://hie-docs.dha.go.ke/eclaims/preauths Partial JSON structure for the preauthorization response. ```json { "accessPoint": "accessPoint", "anaesthesiaType": "anaesthesiaType", "authorization": 0, "authorizationDetails": { "authCode": "authCode", "authorizationReason": "authorizationReason", "authorizationType": [ "string" ], "authorizingDeviceOs": "authorizingDeviceOs", "beneficiary": 0, "beneficiaryCode": "beneficiaryCode", "beneficiaryName": "beneficiaryName", "beneficiaryNumber": "beneficiaryNumber", "beneficiaryScheme": "beneficiaryScheme", "benefitType": "benefitType", "biometricMatchLogId": "biometricMatchLogId", "children": [ { "authorizingDeviceOs": "authorizingDeviceOs", "beneficiaryCode": "beneficiaryCode", "beneficiaryName": "beneficiaryName", "beneficiaryNumber": "beneficiaryNumber", "biometricMatchLogId": "biometricMatchLogId", "ekycToken": "ekycToken", "guid": "guid", "interventions": [ { "activeForUhc": true, "allowedInterventions": [ {} ], "applicableSchemes": [ "string" ], "authInterventionId": 0, "code": "code", "dispenseMedication": true, "fallBackKephLevelTariff": 0, "fund": "fund", "id": 0 ``` -------------------------------- ### Example Request Body Source: https://hie-docs.dha.go.ke/eclaims/preauths JSON structure for the preauthorization request body. ```json { "consent_token": "J6LAFNBPZN", "intervention_code": "SHA-11-001", "service_start": "2025-08-18T15:30:00+03:00", "service_end": "2025-08-19T15:30:00+03:00", "items": [ { "unit_price": "1500.00" } ], "diagnoses": [ { "consent_token": "J6LAFNBPZN", "icd_code": "ca07.0" } ], "doctors": [ { "identification_number": "A00000", "identification_type": "registration_number", "regulation_body": "KMPDC", "intervention_code": "SHA-11-001", "is_primary": true } ], "attachments": [ { "document_title": "Lab Results", "document_type": "BIOPSY_RESULT", "file_field_name": "attachments_0_file_blob" } ], "provider_notification_email": "test@example.com" } ``` -------------------------------- ### Consent status response example Source: https://hie-docs.dha.go.ke/sharedhealthrecord/shr-consent Example JSON response returned when a consent request is successfully retrieved. ```json { "consent_id": "VCR-20260624-13698E26", "consent_status": "Approved", "message": "Consent status retrieved successfully", "status": "success", "visit_id": "f5c2fd92-1847-407f-97b7-a9d277699c22" } ``` -------------------------------- ### Example Response Source: https://hie-docs.dha.go.ke/consent/otp-whitelist The structure of the successful response returned after creating an OTP whitelist request. ```json { "attachments": [ { "contentType": "contentType", "description": "description", "guid": "guid", "uploadedFile": "uploadedFile" } ], "beneficiaryCrId": "beneficiaryCrId", "beneficiaryName": "beneficiaryName", "facilityFrCode": "facilityFrCode", "facilityName": "facilityName", "guid": "guid", "reason": "reason", "reasonType": "reasonType", "reviewedByUser": "reviewedByUser", "reviewerResponseNotes": [ "string" ], "status": "status" } ``` -------------------------------- ### Example Response Body Source: https://hie-docs.dha.go.ke/eclaims/start-visit-consent The JSON structure returned upon a successful visit initiation. ```json { "admitted_on": "admitted_on", "appointment_number": "appointment_number", "attributes": "attributes", "authorization_code": "authorization_code", "authorization_guid": "authorization_guid", "beneficiary_guid": "beneficiary_guid", "beneficiary_id": 0, "beneficiary_is_fuzzy_matched": true, "cancel_reason_text": "cancel_reason_text", "cancel_reason_type": "cancel_reason_type", "claim_attachments_count": 0, "claim_auth_status": "claim_auth_status", "claim_diagnoses": [ { "claim": "claim", "claim_diagnosis_id": 0, "diagnosis": "diagnosis", "diagnosis_code": "diagnosis_code", "diagnosis_name": "diagnosis_name", "edi_claim_diagnosis_guid": "edi_claim_diagnosis_guid", "edi_claim_diagnosis_replicated": "edi_claim_diagnosis_replicated", "intervention_code": "intervention_code", "is_flagged_diagnosis": true, "is_inpatient": true, "original_visit_date": "original_visit_date", "patient_number": "patient_number", "recorded_on": "recorded_on", "site_code": "site_code", "site_code_type": "site_code_type", "visit_number": "visit_number" } ], "claim_id": 0, "created_by_name": "created_by_name", "currency": "currency", "diagnoses_count": 0, "discharge_cancel_date": "discharge_cancel_date", "discharge_cancel_remarks": "discharge_cancel_remarks", "discharge_reason": "discharge_reason", "discharged_on": "discharged_on", "edi_claim_guid": "edi_claim_guid", "emergency_visit_expiry": "emergency_visit_expiry", "estimate_ip_days": 0, "expected_discharge_date": "expected_discharge_date", "has_reviewed_claim": true, "id": {}, "initial_intervention": "initial_intervention", "interventions": [ { "accrued_per_diem_amount": 0, "accrued_per_diem_days": 0, "active_for_uhc": true, "applicable_document_types": [ "string" ], "bill_from": "bill_from", "bill_to": "bill_to", "id": {}, "intervention_code": "intervention_code", "intervention_fund": "intervention_fund", "intervention_name": "intervention_name" } ] ``` -------------------------------- ### Diagnosis request body example Source: https://hie-docs.dha.go.ke/eclaims/billing Example JSON structure for the request body when adding a diagnosis. ```json { "consent_token": "K5HLPJVDNV", "icd_code": "ca07.0", "intervention_code": "SHA-18-005", "practitioner_identification_number": "A00000", "practitioner_identification_type": "registration_number", "practitioner_regulation_body": "KMPDC" } ``` -------------------------------- ### SHR visit closure response example Source: https://hie-docs.dha.go.ke/sharedhealthrecord/shr-consent Example JSON response returned upon successfully closing an SHR visit. ```json { "consent_id": "VCR-20260624-13698E26", "end_date": "2026-06-24T14:32:11Z", "message": "Visit closed successfully", "status": "success", "visit_id": "f5c2fd92-1847-407f-97b7-a9d277699c22" } ``` -------------------------------- ### Claim attachment request body example Source: https://hie-docs.dha.go.ke/eclaims/billing Example JSON structure for the request body when submitting a claim attachment. ```json { "consent_token": "K5HLPJVDNV", "file_blob": "file_blob", "document_type": "BIO_DETAILS", "intervention_code": "SHA-18-005" } ``` -------------------------------- ### Intervention response example Source: https://hie-docs.dha.go.ke/eclaims/interventions The JSON structure returned upon a successful intervention addition. ```json { "accrued_per_diem_amount": 0, "accrued_per_diem_days": 0, "active_for_uhc": true, "applicable_document_types": [ "string" ], "bill_from": "bill_from", "bill_to": "bill_to", "id": {}, "intervention_code": "intervention_code", "intervention_fund": "intervention_fund", "intervention_name": "intervention_name", "intervention_overall_tariff": 0, "intervention_payment_mechanism": "intervention_payment_mechanism", "is_switched_intervention": true, "keph_level_tarrif": 0, "needs_preauth": true, "optional_document_type": [ "string" ], "optional_preauth_document_types": [ "string" ], "preauth_exist": true, "required_preauth_document_types": [ "string" ], "requires_oncology_preauth": true, "requires_optical_preauth": true, "requires_radiology_preauth": true, "requires_renal_preauth": true, "requires_surgical_preauth": true, "sub_benefit_code": "sub_benefit_code", "supported_scheme": "supported_scheme", "switched_intervention_id": 0, "switched_lines_retained": true, "workflow_state": "workflow_state" } ``` -------------------------------- ### Consent request response example Source: https://hie-docs.dha.go.ke/sharedhealthrecord/shr-consent Successful response returned after initiating a consent request. ```json { "consent_id": "VCR-20260624-13698E26", "consent_status": "Pending", "message": "Consent request created successfully", "otp_record": "d67p9lhxxx", "status": "success", "visit_type": "OP" } ``` -------------------------------- ### POST /claims/visit Source: https://hie-docs.dha.go.ke/eclaims/start-visit-consent Starts a new virtual visit and creates a claim record. ```APIDOC ## POST /claims/visit ### Description Starts a new virtual visit and creates a claim record based on the provided patient and practitioner information. ### Method POST ### Endpoint https://ilm-dev.dha.go.ke/uat-middleware/api/v1/claims/visit ### Request Body - **intervention_codes** (array) - Required - List of intervention codes. - **patient_id** (string) - Required - The unique identifier for the patient. - **service_type** (string) - Required - The type of service (e.g., CAPITATION). - **otp** (string) - Required - One-time password for verification. - **practitioner_identification_type** (string) - Required - Type of practitioner identification. - **practitioner_identification_number** (string) - Required - The practitioner's identification number. - **practitioner_regulation_body** (string) - Required - The regulatory body for the practitioner. ### Request Example { "intervention_codes": [ "string" ], "patient_id": "CR2594484249725-2", "service_type": "CAPITATION", "otp": "123456", "practitioner_identification_type": "registration_number", "practitioner_identification_number": "A00000", "practitioner_regulation_body": "KMPDC" } ### Response #### Success Response (200) - **admitted_on** (string) - Admission date. - **claim_id** (integer) - Unique identifier for the created claim. - **visit_number** (string) - The generated visit number. - **workflow_state** (string) - Current state of the claim workflow. ``` -------------------------------- ### Preauthorization response structure Source: https://hie-docs.dha.go.ke/eclaims/preauths Example JSON response body returned when successfully fetching a preauthorization. ```json { "accessPoint": "accessPoint", "anaesthesiaType": "anaesthesiaType", "authorization": 0, "authorizationDetails": { "authCode": "authCode", "authorizationReason": "authorizationReason", "authorizationType": [ "string" ], "authorizingDeviceOs": "authorizingDeviceOs", "beneficiary": 0, "beneficiaryCode": "beneficiaryCode", "beneficiaryName": "beneficiaryName", "beneficiaryNumber": "beneficiaryNumber", "beneficiaryScheme": "beneficiaryScheme", "benefitType": "benefitType", "biometricMatchLogId": "biometricMatchLogId", "children": [ { "authorizingDeviceOs": "authorizingDeviceOs", "beneficiaryCode": "beneficiaryCode", "beneficiaryName": "beneficiaryName", "beneficiaryNumber": "beneficiaryNumber", "biometricMatchLogId": "biometricMatchLogId", "ekycToken": "ekycToken", "guid": "guid", "interventions": [ { "activeForUhc": true, "allowedInterventions": [ {} ], "applicableSchemes": [ "string" ], "authInterventionId": 0, "code": "code", "dispenseMedication": true, "fallBackKephLevelTariff": 0, "fund": "fund", "id": 0, "interventionCombinations": [ {} ], "kephLevelTarrif": 0, "name": "name", "needsPreauth": true, "numberOfDaysToFallback": 0, "overallTariff": 0, "packageCombinations": [ {} ], "paymentMechanism": "paymentMechanism", "preauthFinalised": true, "prescriptionMedication": true, "requiresSurgicalPreauth": true, "standaloneInterventions": [ {} ], "subBenefitCode": "subBenefitCode", "supportedScheme": "supportedScheme" } ], "isBiometricsDischargeAuthorization": true, "isElective": true, "isOpen": true, "parentAuthorization": 0, "parentType": "parentType", "preauthTypes": {}, "sessionType": "sessionType" ``` -------------------------------- ### Example Request Body Source: https://hie-docs.dha.go.ke/eclaims/billing The JSON payload required for the PATCH request. ```json { "consent_token": "K5HLPJVDNV", "line_guid": "a1b2c3d4-5678-90ab-cdef-1234567890ab" } ``` -------------------------------- ### Example Request Body Source: https://hie-docs.dha.go.ke/eclaims/billing A JSON representation of the required fields for the claim line item request. ```json { "consent_token": "8EUTW6AQF5", "intervention_code": "SHA-09-021", "unit_price": "300", "quantity": "1", "service_name": "Basic consultation", "service_identifier": "C/123", "practitioner_identification_type": "registration_number", "practitioner_identification_number": "A00000", "practitioner_regulation_body": "KMPDC" } ``` -------------------------------- ### Emergency protocol response example Source: https://hie-docs.dha.go.ke/eclaims/emergency Successful response object returned after adding an emergency protocol. ```json { "attributes": "attributes", "bill_from": "bill_from", "bill_to": "bill_to", "charge_date": "charge_date", "discount": 0, "discount_reason": "discount_reason", "doctor_code": "doctor_code", "doctor_name": "doctor_name", "id": "id", "intervention_code": "intervention_code", "invoice": "invoice", "is_active": true, "is_cancellation": true, "is_return": true, "item_code": "item_code", "item_name": "item_name", "line_copay": 0, "line_net_amount": 0, "line_number": "line_number", "line_total_amount": 0, "linked_invoice_line": "linked_invoice_line", "map_request": "map_request", "map_request_description": "map_request_description", "mapped_slade_code": "mapped_slade_code", "nhif_rebate_amount": 0, "patient_discount_amount": 0, "patient_net_price": 0, "pmf_line_status": "pmf_line_status", "quantity": 0, "scheme_code": "scheme_code", "scheme_name": "scheme_name", "sponsor_net_price": 0, "uhc_exceeded": true, "unit": "unit", "unit_price": 0 } ``` -------------------------------- ### GET /preauths Source: https://hie-docs.dha.go.ke/eclaims/preauths Fetches an existing preauthorization linked to the provided consent token. ```APIDOC ## GET /preauths ### Description Fetches an existing preauthorization linked to the consent token provided. ### Method GET ### Endpoint https://ilm-dev.dha.go.ke/uat-middleware/api/v1/preauths ### Parameters #### Query Parameters - **consent_token** (string) - Required - consent token linked to the preauth ### Request Example curl --request GET \ --url 'https://ilm-dev.dha.go.ke/uat-middleware/api/v1/preauths?consent_token=K5HLPJVDNV' ### Response #### Success Response (200) - **accessPoint** (string) - Access point - **anaesthesiaType** (string) - Anaesthesia type - **authorization** (integer) - Authorization ID - **status** (string) - Current status of the preauth - **totalEstimatedAmountForPreauth** (number) - Total estimated amount #### Response Example { "accessPoint": "accessPoint", "anaesthesiaType": "anaesthesiaType", "authorization": 0, "status": "pending" } ``` -------------------------------- ### Check patient SHA eligibility request Source: https://hie-docs.dha.go.ke/eclaims/eligibility Example cURL request to the eligibility endpoint. ```shell curl --request GET \ --url 'https://ilm-dev.dha.go.ke/uat-middleware/api/v1/patients/eligibility?identification_number=%3Cstring%3E&identification_type=%3Cstring%3E' ``` -------------------------------- ### Example Response Source: https://hie-docs.dha.go.ke/eclaims/e-prescriptions The empty JSON object returned upon successful removal of the doctor. ```json {} ``` -------------------------------- ### Visit OTP Request Body Source: https://hie-docs.dha.go.ke/consent/send-otp Example JSON payload for the visit OTP request. ```json { "contact_id": 1, "intervention_codes": [ "string" ], "patient_id": "CR2594484249725-2" } ``` -------------------------------- ### Request Body Example Source: https://hie-docs.dha.go.ke/eclaims/preauths JSON structure for the request body required to remove a diagnosis. ```json { "consent_token": "K5HLPJVDNV", "icd_code": "ca07.0", "intervention_code": "SHA-18-005" } ``` -------------------------------- ### Consent request body example Source: https://hie-docs.dha.go.ke/sharedhealthrecord/shr-consent JSON payload structure required to initiate a consent request. ```json { "cr_id": "CR99551207471367-7", "facility_id": "FID-47-115307-8", "requested_by": "Registration Clerk", "visit_type": "OP" } ``` -------------------------------- ### Claim Submission Response Schema Source: https://hie-docs.dha.go.ke/eclaims/claim-dispatch Example structure of the response returned after a successful claim submission. ```json { "admitted_on": "admitted_on", "appointment_number": "appointment_number", "attributes": "attributes", "authorization_code": "authorization_code", "authorization_guid": "authorization_guid", "beneficiary_guid": "beneficiary_guid", "beneficiary_id": 0, "beneficiary_is_fuzzy_matched": true, "cancel_reason_text": "cancel_reason_text", "cancel_reason_type": "cancel_reason_type", "claim_attachments_count": 0, "claim_auth_status": "claim_auth_status", "claim_diagnoses": [ { "claim": "claim", "claim_diagnosis_id": 0, "diagnosis": "diagnosis", "diagnosis_code": "diagnosis_code", "diagnosis_name": "diagnosis_name", "edi_claim_diagnosis_guid": "edi_claim_diagnosis_guid", "edi_claim_diagnosis_replicated": "edi_claim_diagnosis_replicated", "intervention_code": "intervention_code", "is_flagged_diagnosis": true, "is_inpatient": true, "original_visit_date": "original_visit_date", "patient_number": "patient_number", "recorded_on": "recorded_on", "site_code": "site_code", "site_code_type": "site_code_type", "visit_number": "visit_number" } ], "claim_id": 0, "created_by_name": "created_by_name", "currency": "currency", "diagnoses_count": 0, "discharge_cancel_date": "discharge_cancel_date", "discharge_cancel_remarks": "discharge_cancel_remarks", "discharge_reason": "discharge_reason", "discharged_on": "discharged_on", "edi_claim_guid": "edi_claim_guid", "emergency_visit_expiry": "emergency_visit_expiry", "estimate_ip_days": 0, "expected_discharge_date": "expected_discharge_date", "has_reviewed_claim": true, "id": {}, "initial_intervention": "initial_intervention", "interventions": [ { "accrued_per_diem_amount": 0, "accrued_per_diem_days": 0, "active_for_uhc": true, "applicable_document_types": [ "string" ], "bill_from": "bill_from", "bill_to": "bill_to", "id": {}, "intervention_code": "intervention_code", "intervention_fund": "intervention_fund" } ] ``` -------------------------------- ### GET /patients/otp-whitelists/callback Source: https://hie-docs.dha.go.ke/consent/otp-whitelist Retrieves a list of OTP whitelist requests related to a particular patient or GUID. ```APIDOC ## GET /patients/otp-whitelists/callback ### Description Get a list of OTP whitelist requests related to a particular patient or a given guid. ### Method GET ### Endpoint https://ilm-dev.dha.go.ke/uat-middleware/api/v1/patients/otp-whitelists/callback ### Parameters #### Query Parameters - **beneficiary_cr_id** (string) - Optional - Patient client registry number. - **guid** (string) - Optional - OTP Whitelist guid. - **facility_fr_code** (string) - Optional - Facility registry code. #### Headers - **X-Facility-Id** (string) - Required - Facility Registry (FR) code identifying the facility. - **X-Facility-Id-Type** (string) - Required - Type of identifier supplied in X-Facility-Id (e.g., fr-code). ### Response #### Success Response (200) - **count** (integer) - Total count of records. - **currentPage** (integer) - Current page number. - **endIndex** (integer) - End index of the current page. - **next** (string) - URL for the next page. - **pageSize** (integer) - Number of items per page. - **previous** (string) - URL for the previous page. - **results** (object[]) - List of OTP whitelist request objects. - **startIndex** (integer) - Start index of the current page. - **totalPages** (integer) - Total number of pages. ### Response Example { "count": 0, "currentPage": 0, "endIndex": 0, "next": "next", "pageSize": 0, "previous": "previous", "results": [ { "beneficiaryCrId": "beneficiaryCrId", "beneficiaryName": "beneficiaryName", "biometricsAttempt": 0, "created": "created", "facilityFrCode": "facilityFrCode", "facilityName": "facilityName", "guid": "guid", "reason": "reason", "reasonType": "reasonType", "reviewedByUser": "reviewedByUser", "reviewerResponseNotes": [ { "responseNotes": "responseNotes" } ], "status": "status" } ], "startIndex": 0, "totalPages": 0 } ``` -------------------------------- ### Get patient contacts response Source: https://hie-docs.dha.go.ke/consent/get-otp-contact Example JSON response structure for a successful patient contact retrieval. ```json { "count": 0, "results": [ { "active": true, "contactType": "contactType", "contactValue": "contactValue", "id": 0, "isConfirmed": true } ] } ``` -------------------------------- ### GET /claims/authorizations Source: https://hie-docs.dha.go.ke/consent/authorizations Retrieves existing authorizations. All query parameters are optional and act as a one-of search: look up by token, by patient_id, or by guid. ```APIDOC ## GET /claims/authorizations ### Description Retrieves existing authorizations. All query params are OPTIONAL and act as a one-of search: look up by token, by patient_id, or by guid. ### Method GET ### Endpoint https://ilm-dev.dha.go.ke/uat-middleware/api/v1/claims/authorizations ### Parameters #### Query Parameters - **token** (string) - Optional - Consent token for the authorization (one-of search) - **patient_id** (string) - Optional - Beneficiary id (one-of search) - **guid** (string) - Optional - Authorization GUID (one-of search) ### Headers - **X-Facility-Id** (string) - Required (when using service-account token) - Facility Registry (FR) code identifying the facility. - **X-Facility-Id-Type** (string) - Required (when using service-account token) - Type of identifier supplied in X-Facility-Id (currently only 'fr-code' is supported). ### Response #### Success Response (200) - **object[]** (array) - Authorizations retrieved successfully #### Response Example [ { "authCode": "authCode", "authorizationReason": "authorizationReason", "authorizationType": ["string"], "authorizingDeviceOs": "authorizingDeviceOs", "beneficiary": 0, "beneficiaryCode": "beneficiaryCode", "beneficiaryJoinDate": "beneficiaryJoinDate", "beneficiaryName": "beneficiaryName", "beneficiaryNumber": "beneficiaryNumber", "beneficiaryScheme": "beneficiaryScheme", "benefitType": "benefitType", "biometricMatchLogId": "biometricMatchLogId", "created_by": "created_by", "dateAuthorized": "dateAuthorized", "ekycToken": "ekycToken", "endDate": "endDate", "expiry": "expiry", "guardian": 0, "guid": "guid", "id": 0, "isBiometricsDischargeAuthorization": true, "isComplete": true, "isElective": true, "isEmergency": true, "isOpen": true, "label": "label", "needsPreauth": true, "notes": "notes", "overallPreauthFinalised": true, "parentAuthorization": 0, "parentType": "parentType", "provider": 0, "providerFid": "providerFid", "providerName": "providerName", "requestedBy": "requestedBy", "sessionType": "sessionType", "shaGuid": "shaGuid", "shaVerificationRequest": { "embedExpiry": 0, "embededToken": "embededToken", "requestId": "requestId", "requestUrl": "requestUrl" }, "shaVerificationRequestId": "shaVerificationRequestId", "status": "status", "token": "token", "updated_by": "updated_by", "workStationId": "workStationId" } ] ``` -------------------------------- ### Doctor Request Body Example Source: https://hie-docs.dha.go.ke/eclaims/preauth-doctor-consent Example JSON payload for a preauthorization doctor request. ```json { "practitioner_registration_number": "A00000", "request_type": "PREAUTH_DOCTOR_APPROVAL_REQUEST", "consent_token": "K5HLPJVDNV", "intervention_code": "SHA-11-001" } ``` -------------------------------- ### Beneficiary enrollment status response example Source: https://hie-docs.dha.go.ke/consent/minors-biometrics-enrollment This JSON object represents a successful response indicating the beneficiary's current enrollment state and the status of specific finger positions. ```json { "enrollment_status": "partially_enrolled", "non_verified": [ 0 ], "total": 3, "verified": [ 0 ] } ``` -------------------------------- ### Example Request Body Source: https://hie-docs.dha.go.ke/consent/otp-whitelist JSON representation of the request body for creating an OTP whitelist request. ```json { "beneficiary_cr_id": "CR2594484249725-2", "reason_type": "OTHER", "reason": "Patient's fingerprints could not be captured after multiple attempts.", "biometric_attempts": "3", "facility_fr_code": "FID-47-108521-3", "attachments": [ { "document_title": "Support doc", "document_type": "MEDICAL_REPORT", "file_field_name": "attachments_file_blob" } ] } ``` -------------------------------- ### FHIR Bundle Request Body Example Source: https://hie-docs.dha.go.ke/sharedhealthrecord/shr-records Example JSON structure for a FHIR collection bundle submission. ```json { "entry": [ {} ], "resourceType": "Bundle", "type": "collection" } ``` -------------------------------- ### SHR Submission Response Example Source: https://hie-docs.dha.go.ke/sharedhealthrecord/shr-records Example JSON response returned upon successful submission of a FHIR bundle. ```json { "mediator_id": "b3f0a3f6-2c1e-4a41-9f0a-3f6c1e4a419f", "message": "Bundle submitted successfully", "status": "success" } ``` -------------------------------- ### Authorization Response Schema Source: https://hie-docs.dha.go.ke/consent/authorizations Example of the JSON response returned upon successful authorization creation. ```json { "authCode": "authCode", "authorizationReason": "authorizationReason", "authorizationType": [ "string" ], "authorizingDeviceOs": "authorizingDeviceOs", "beneficiary": 0, "beneficiaryCode": "beneficiaryCode", "beneficiaryJoinDate": "beneficiaryJoinDate", "beneficiaryName": "beneficiaryName", "beneficiaryNumber": "beneficiaryNumber", "beneficiaryScheme": "beneficiaryScheme", "benefitType": "benefitType", "biometricMatchLogId": "biometricMatchLogId", "created_by": "created_by", "dateAuthorized": "dateAuthorized", "ekycToken": "ekycToken", "endDate": "endDate", "expiry": "expiry", "guardian": 0, "guid": "guid", "id": 0, "isBiometricsDischargeAuthorization": true, "isComplete": true, "isElective": true, "isEmergency": true, "isOpen": true, "label": "label", "needsPreauth": true, "notes": "notes", "overallPreauthFinalised": true, "parentAuthorization": 0, "parentType": "parentType", "provider": 0, "providerFid": "providerFid", "providerName": "providerName", "requestedBy": "requestedBy", "sessionType": "sessionType", "shaGuid": "shaGuid", "shaVerificationRequest": { "embedExpiry": 0, "embededToken": "embededToken", "requestId": "requestId", "requestUrl": "requestUrl" }, "shaVerificationRequestId": "shaVerificationRequestId", "status": "status", "token": "token", "updated_by": "updated_by", "workStationId": "workStationId" } ``` -------------------------------- ### GET /api/v1/claims/emergency/protocols Source: https://hie-docs.dha.go.ke/docs/scenarios/scenario-8-eccif-emergency-unidentified Retrieves approved emergency protocols. ```APIDOC ## GET /api/v1/claims/emergency/protocols ### Description Retrieves approved emergency protocols based on intervention code. ### Method GET ### Endpoint /api/v1/claims/emergency/protocols ### Query Parameters - **intervention_code** (string) - Required - **active** (boolean) - Required - Set to true ### Response - **protocolCode** (string) - Protocol identifier - **applicableTariff** (number) - Tariff amount ``` -------------------------------- ### Create Authorization via cURL Source: https://hie-docs.dha.go.ke/consent/authorizations Example request to create an authorization using a one-time password. ```shell curl --request POST \ --url https://ilm-dev.dha.go.ke/uat-middleware/api/v1/claims/authorize \ --header 'Content-Type: application/json' \ --data ' { "patient_id": "CR2594484249725-2", "service_type": "OUTPATIENT", "otp": "123456", "interventions": [ "string" ] } ' ``` -------------------------------- ### GET /api/v1/patients/eligibility Source: https://hie-docs.dha.go.ke/docs/scenarios/scenario-1-shif-ip-per-diem Checks SHA eligibility for a patient. ```APIDOC ## GET /api/v1/patients/eligibility ### Description Checks the eligibility status of schemes under SHA for a specific patient. ### Method GET ### Endpoint /api/v1/patients/eligibility ### Query Parameters - **identification_number** (string) - Required - **identification_type** (string) - Required ``` -------------------------------- ### Upload multiple attachments using Pattern A Source: https://hie-docs.dha.go.ke/docs/claims/guides/adding-attachments Demonstrates sending multiple attachments in a single request by mapping metadata objects to specific multipart part names. ```bash curl -X POST "$BASE_URL/api/v1/claims/lines" \ -H "Authorization: Bearer $TOKEN" \ -F 'consent_token=K5HLPJVDNV' \ -F 'intervention_code=SHA-18-005' \ -F 'unit_price=1500' \ -F 'quantity=1' \ -F 'attachments=[{"document_title":"Itemised bill","document_type":"FINAL_BILL","file_field_name":"bill_file"},{"document_title":"Lab result","document_type":"LAB_RESULTS","file_field_name":"lab_file"}]' \ -F 'bill_file=@/path/to/final-bill.pdf' \ -F 'lab_file=@/path/to/lab-result.pdf' ``` -------------------------------- ### GET /api/v1/patients Source: https://hie-docs.dha.go.ke/docs/scenarios/scenario-1-shif-ip-per-diem Searches for a patient using identification details. ```APIDOC ## GET /api/v1/patients ### Description Searches for a patient to retrieve their beneficiary CR ID and demographic information. ### Method GET ### Endpoint /api/v1/patients ### Query Parameters - **identification_number** (string) - Required - **identification_type** (string) - Required ``` -------------------------------- ### GET /api/v1/patients Source: https://hie-docs.dha.go.ke/docs/scenarios/scenario-2-shif-ip-ffs-normal-preauth Searches for a patient by identification number and type. ```APIDOC ## GET /api/v1/patients ### Description Searches for a patient by identification number and type. ### Method GET ### Endpoint /api/v1/patients ### Query Parameters - **identification_number** (string) - Required - **identification_type** (string) - Required ### Response - **id** (string) - The beneficiary CR ID (patient_id). ``` -------------------------------- ### Create a preauthorization using cURL Source: https://hie-docs.dha.go.ke/eclaims/preauths Use this cURL command to submit a preauthorization request using multipart/form-data. ```shell curl --request POST \ --url https://ilm-dev.dha.go.ke/uat-middleware/api/v1/preauths \ --header 'Content-Type: multipart/form-data' \ --form consent_token=J6LAFNBPZN \ --form intervention_code=SHA-11-001 \ --form 'service_start=2025-08-18T15:30:00+03:00' \ --form 'service_end=2025-08-19T15:30:00+03:00' \ --form 'items={"unit_price":"1500.00"}' \ --form 'diagnoses={"consent_token":"J6LAFNBPZN","icd_code":"ca07.0"}' \ --form 'doctors={"identification_number":"A00000","identification_type":"registration_number","regulation_body":"KMPDC","intervention_code":"SHA-11-001","is_primary":true}' \ --form 'attachments={"document_title":"Lab Results","document_type":"BIOPSY_RESULT","file_field_name":"attachments_0_file_blob"}' \ --form provider_notification_email=test@example.com ``` -------------------------------- ### Fetch Concept Mappings Response Source: https://hie-docs.dha.go.ke/terminology-service/clinical-concepts Example JSON response structure for concept mappings including child concept details. ```json { "count": 0, "results": [ { "children": [ { "code": "code", "display": "display", "map_type": "map_type", "system": "system" } ], "code": "code", "display": "display", "system": "system" } ] } ``` -------------------------------- ### GET /patients/pomsf-balances Source: https://hie-docs.dha.go.ke/eclaims/eligibility Retrieves the POMSF balances and policy details for a patient. ```APIDOC ## GET /patients/pomsf-balances ### Description Retrieves POMSF balances, member policies, and family member details for a specific patient. ### Method GET ### Endpoint https://ilm-dev.dha.go.ke/uat-middleware/api/v1/patients/pomsf-balances ### Parameters #### Query Parameters - **patient_id** (string) - Required - The unique identifier for the patient. ### Response #### Success Response (200) - **dateOfBirth** (string) - Patient date of birth - **email** (string) - Patient email - **familyMembers** (object[]) - List of family members - **firstName** (string) - Patient first name - **gender** (string) - Patient gender - **householdId** (string) - Household identifier - **id** (string) - Patient ID - **lastName** (string) - Patient last name - **memberNumber** (string) - Member number - **memberPolicies** (object[]) - List of member policies - **middleName** (string) - Patient middle name - **nationalId** (string) - National ID - **parentNumber** (string) - Parent number - **phone** (string) - Phone number - **phoneCode** (string) - Phone code - **policyCount** (integer) - Total policy count - **registeredOn** (string) - Registration date - **relationshipType** (string) - Relationship type - **schemeCount** (integer) - Total scheme count - **shaNumber** (string) - SHA number - **title** (string) - Patient title #### Response Example { "dateOfBirth": "dateOfBirth", "email": "email", "firstName": "firstName", "id": "id", "lastName": "lastName", "memberNumber": "memberNumber" } ``` -------------------------------- ### GET /api/v1/patients/contacts Source: https://hie-docs.dha.go.ke/docs/scenarios/scenario-7-eccif-emergency-identified Retrieves a list of patient contacts for OTP verification. ```APIDOC ## GET /api/v1/patients/contacts ### Description Retrieves a list of patient contacts for OTP verification. ### Method GET ### Endpoint /api/v1/patients/contacts ### Parameters #### Query Parameters - **patient_id** (string) - Required ### Response #### Success Response (200) - **id** (string) - Contact ID. ``` -------------------------------- ### Fetch a preauthorization via cURL Source: https://hie-docs.dha.go.ke/eclaims/preauths Use this cURL command to retrieve an existing preauthorization by providing a valid consent token. ```shell curl --request GET \ --url 'https://ilm-dev.dha.go.ke/uat-middleware/api/v1/preauths?consent_token=%3Cstring%3E' ``` -------------------------------- ### Discharge response example Source: https://hie-docs.dha.go.ke/eclaims/claim-dispatch JSON structure for the successful patient discharge response. ```json { "admitted_on": "admitted_on", "appointment_number": "appointment_number", "attributes": "attributes", "authorization_code": "authorization_code", "authorization_guid": "authorization_guid", "beneficiary_guid": "beneficiary_guid", "beneficiary_id": 0, "beneficiary_is_fuzzy_matched": true, "cancel_reason_text": "cancel_reason_text", "cancel_reason_type": "cancel_reason_type", "claim_attachments_count": 0, "claim_auth_status": "claim_auth_status", "claim_diagnoses": [ { "claim": "claim", "claim_diagnosis_id": 0, "diagnosis": "diagnosis", "diagnosis_code": "diagnosis_code", "diagnosis_name": "diagnosis_name", "edi_claim_diagnosis_guid": "edi_claim_diagnosis_guid" ``` -------------------------------- ### POST /api/v1/biometrics/enrollments Source: https://hie-docs.dha.go.ke/docs/consent/guides/minors-biometrics-enrollment Initiates the enrollment process for a minor's finger. The capture is sent to the scanner, and the result is returned via a callback. ```APIDOC ## POST /api/v1/biometrics/enrollments ### Description Initiates the enrollment process for a minor's finger. The system returns a job_id and expects an enrollment callback once the capture is performed. ### Method POST ### Endpoint /api/v1/biometrics/enrollments ### Request Body - **beneficiary_code** (string) - Required - The child's CR code. - **workstation_id** (string) - Required - The workstation identifier. - **device_id** (string) - Required - The device identifier. - **agent_id** (string) - Required - The agent identifier. - **position** (integer) - Required - The position of the finger (1-10). ### Response #### Success Response (202) - **job_id** (string) - The identifier for the enrollment job. - **next_action** (string) - Indicates the next step, e.g., 'await_callback'. ``` -------------------------------- ### Hardware Server Status Response Source: https://hie-docs.dha.go.ke/docs/consent/process/biometricsConsent Example JSON response from the status endpoint indicating workstation ID and connected devices. ```json { "workstationID": "WS-12345", "devices": [ { "deviceId": "DEV-001", "status": "connected", "type": "fingerprint" } ] } ```