Note these are reserved APIs for use by Healthcode internal products only. These APIs must not be consumed by external integrators.

API Discovery

Discovery document for Clearing APIs is published at https://claims.api.dev.healthcode.co.uk/.well-known/api-configuration

List Pending Remittances

The List Pending Remittances API enables the caller to query if any outstanding remittance batches are pending for them. This API must be used in combination with Get Remittance Details and Ack Remittance Receipt APIs to periodically scan and consume the outstanding remittances.

Endpoint

Must be looked up from discovery-document using key list_pending_remittances_endpoint.

Request

curl --request GET  
--url 'https://claims.api.dev.healthcode.co.uk/claimresponse/$batch?
page=1&
count=5'  
--header 'content-type: application/fhir+json' 

This API supports pagination, sorting and filter parameters as documented here.

Response Processing

The list-remittances API returns a paged-result of remittance headers in below format.

{
"resourceType": "Bundle",
"meta": {
"tag": [
{
"code": "count",
"display": "5"
},
{
"code": "page",
"display": "1"
},
{
"code": "maxRecords",
"display": "1"
}
]
},
"type": "collection",
"total": 1,
"entry": [
{
"resource": {
"resourceType": "Bundle",
"id": "20191218134349688e1020019",
"timestamp": "2021-07-11T18:06:05.000+05:30"
}
}
]
}

Where,

The API reads the siteId (used as userId for authentication) from the token and fetches the claims belonging to the site.

Error Handling

List-remittances API does not return any API-specific errors. When no matches are found, the API will return empty resultset. Calling applications must handle the standard error scenarios like API endpoint not being available, connection timeout, etc.

Get Remittance Details

The get-remittance-details API allows retrieving details for a specific remittance record.

Endpoint

Must be looked up from discovery-document using key get_remittance_details_endpoint.

Request

curl --request GET 
  --url 'https://claims.api.dev.healthcode.co.uk/claimresponse/$batch/{id}' 
  --header 'content-type: application/fhir+json'

Where,

FieldTypeDescription
idStringUnique identifier of the remittance batch for which details are needed. This must be a valid ID returned by List Pending Remittances API call.

Response Processing

When the input ID matches a valid remittance batch, the API returns details as a JSON object as below.

{
    "msgId": "5",
    "msgIssueDate": "2016-11-02T15:49:55",
    "msgSender": "Healthcode",
    "msgRecipient": "HC00HAU",
    "insurer": "bup",
    "status": "TEST",
    "providers": [
        {
            "providerNo": {
                "id": "03324866",
                "scheme": "9BU01"
            },
            "providerName": "sample",
            "paymentDetails": {
                "paymentReference": "1000698055",
                "processDate": "2013-10-17",
                "paymentDate": "2013-10-18",
                "broughtForward": 0.00,
                "carriedForward": 0.00,
                "amountDue": 3675.00,
                "amountPaid": 3020.00,
                "paymentMethod": "BACS Transfer",
                "bankSortCode": "222222",
                "bankAccountNo": "12345678"
            },
            "claims": [
                {
                    "cuid": {
                        "id": "1",
                        "scope": "Provider"
                    },
                    "chClaimNo": "20132890001217",
                    "payorClaimNo": "000000010",
                    "invoiceNo": "0000000033",
                    "invoiceRef": "null",
                    "claimAmount": 1000.00,
                    "paidAmount": 1000.00,
                    "prevPaidAmount": 0.00,
                    "shortAmount": 0.00,
                    "registrationNo": "7594655980"
                }
            ]
        }
    ]
}

Where,

FieldTypeDescription
msgIdStringAn identifier generated by the sending application that is unique across all instances of the remittance message originating from that system to one recipient.
A combination of message type, msgSender, msgRecipient and msgId shall be globally unique.
msgId can contain a unique, sequential, contiguous number that the recipient (Healthcode) can use to confirm that no messages can be missed.
msgIssueDateTimestampThe date and time of issue of the message. The date of issue is the date at which the sending application completes its last step of generating and processing the XML message instance.
msgSenderStringAlways “Healthcode”.
msgRecipientStringUnique identifier allocated to the calling site.
insurerStringOptional. Where msgSender is “Healthcode” this indicates which insurer issued the remittances.
statusStringString Status indicates whether the remittance batch was created enabling integration testing. Possible values are “TEST” or “LIVE”. When the status field is missing or null, status must be considered as “LIVE”. When status is “TEST”, caller must ensure the data is not used to update any production data on calling system end.
providers
providerNoSchemed idThe ProviderNo of the provider that submitted the claim (payeeNo in PMIClaimMsg) is mandatory. Scheme field identifies the code list used.
paymentDetails
paymentReferenceStringReference of the payment as presented to the bank for a transfer or the cheque number if the method of payment is cheque.
processDateDateThe computer processing date when the remittances were created on the payor’s system.
paymentDateDate The Value Date of the payment which, for BACS payments, represents the date that the payment is actually due to be credited to the recipient’s bank account.
broughtForwardMonetaryAny amount due to the provider or outstanding from the provider from the previous payment period. It will be equal to the value in the CarriedForward element of the previous PMIRemittance (or prior system) for that provider.
carriedForwardMonetaryThe net total of the amount brought forward from the previous payment period, plus the amount due to be paid in this payment period less the amount actually being paid. In normal circumstances the brought forward and carried forward amounts will be zero.
amountDueMonetaryThe total of the payable amounts of the claims included in the message for the provider that will equal the sum of the ClaimAmt elements for each claim.
amountPaidMonetaryThe actual amount credited to the provider’s bank account or forwarded as a cheque.
paymentMethodStringIndicates how the payment is made. The allowed values are Cheque or BACS.
bankSortCodeStringThe bank sort code if the paymentMethod is “BACS”.
bankAccountNoStringThe bank account number if the paymentMethod is “BACS”.
 claims
cuidScoped idThe element cuid, with a default scope of “Provider”, is included to enable the sender to provide a unique identifier for each individual claim remittance in the batch. The scope of uniqueness being msgId, provider and cuid. This could be used to update information about a single remittance, but this is outside the scope of this implementation guide.
Healthcode requires senders to include the element cuid with a scope of “Provider”. The value used should be a unique, sequential, contiguous number for each claim starting from 1 for each provider included within the message.
chClaimNoStringAn internal reference used at Healthcode to link a particular remittance to the original claim.
payorClaimNoStringPayor’s unique reference for the claim.
invoiceNoStringProvider’s invoice number.
invoiceRefStringMany hospital systems require their invoice reference as well as invoice number to be returned in order to allow remittances to be automatically posted to their patient accounting system. The optional element invoiceRef is used to provide this item and should be provided wherever possible.
claimAmountMonetaryTotal value of the claim.
paidAmountMonetaryThe amount actually remitted to the provider.
prevPaidAmountMonetaryAny amount previously paid (and/or short-paid).
shortAmountMonetaryThe difference between the total value of the claim, any previously paid amount and the amount remitted. (Note, if an amount has previously been reported as short-paid or rejected then this amount should include the total previously reported as paid and short-paid).
shortPay/shortPayExThe message can convey the reason for a short payment as either as a coded or free text reason.
Where coded reasons are specified the shortPay element will be repeated for each reason. The element shortPay has an optional attribute scheme which contains a reference to the code list used. The code meaning can optionally be provided using the codesDirectory, using scheme attribute to refer to corresponding code subset.
Where the monetary amount of the short payment and/or the reason for the short payment as free text have to be included, then compound element shortPayEx will be used, repeated for each reason. This element contains one occurrence of the element shortPay (where the attribute scheme may optionally be included) one occurrence of the element amount, one occurrence of the element reason (which will contain the free text reason for the short payment) and one occurrence of collectionService (which indicates which collection service, if any, is dealing with this shortfall). shortPay, amount, reason and collectionService are optional elements.
For one claim, only one style of reason will be present, i.e. where several reasons are included, they will be all coded or all compound.
registrationNoStringThe payor’s reference for the patient.
patientName/
patientNameUnstruct
PersonName/StringThe name of the patient. Name is either provided as a unstructured plain-string, in which case patientNameUnstruct field is populated, or as a structured PersonalName element containing title, given name, middle name and family name, in which case the patientName field is populated. For a given claim, only one of these fields will be populated.
codesDirectorySchemedSetCodes directory will contain a list of schemed-set containing code/description values under a given scheme. Dataset under the directory must be used to lookup description where a code and scheme are specified in other parts of the response JSON.

If the remittance batch is consumed successfully, you must call Ack Remittance Receipt API to inform Healthcode of the successful import. If ack-remittance-receipt API call is not made, the remittance record will continue to be returned in future List Pending Remittances API calls.

Error Handling

The API may return below error codes.

Error CodeObjectDescription
InvalidIdtype: “id”,
id: 20191227170009040Chb00208
Invalid id input. This could mean either the supplied ID did not match any record or the record has been subsequently deleted.

Ack Remittance Receipt

This API allows you to receipt a remittance record after successful import of the remittance batch.

Endpoint

Must be looked up from discovery-document using key ack_remittance_endpoint.

Request


curl --request DELETE 
  --url 'https://claims.api.dev.healthcode.co.uk/claimresponse/$batch/{id}' 
  --header 'content-type: application/fhir+json'

Where,

FieldTypeDescription
idStringUnique identifier of the specific remittance batch which must be receipted.

Response Processing

The API does not return any response payload. When the requested remittance batch is successfully receipted the API will return http status 200.

Error Handling

The API may return below error codes.

Error CodeObjectDescription
InvalidIdtype: “id”,
id: 20191227170009040Chb00208
Invalid id input. This could mean either the supplied ID did not match any record or the record has been subsequently deleted.

Get Hospital Claims List

This API allows the calling application to generate a list of claims for which the service has already been rendered or provided. User can use a dateCompleted field in search parameter where the API returns the claims with services rendered on that day. 

Endpoint

Must be looked up from discovery-document using key list_hospital_claims_endpoint.

Request

curl --request GET 
  --url 'https://claims.api.dev.healthcode.co.uk/claim/$hospital-claim?
           dateCompleted=2017-08-23' 
  --header 'content-type: application/fhir+json'

Where,

FieldTypeDescription
dateCompleteddateDate when the services are rendered. Format: yyyy-MM-dd. Optional field.

Response Processing

Below is the API response which returns the relevant claims.

{
    "resourceType": "Bundle",
    "meta": {
        "tag": [
            {
                "code": "count",
                "display": "2"
            },
            {
                "code": "page",
                "display": "1"
            },
            {
                "code": "maxCount",
                "display": "3"
            }
        ]
    },
    "type": "collection",
    "total": 2,
    "entry": [
        {
            "fullUrl": "https://claims.api.healthcode.co.uk/claim/201708230810157892FBL0792/encounter/202206232248293671NMX0004",
            "resource": {
                "resourceType": "Encounter",
                "id": "202206232248293671NMX0004",
                "episodeOfCare": [
                    {
                        "extension": [
                            {
                                "url": "setting",
                                "valueString": "Outpatient"
                            }
                        ]
                    }
                ]
            }
        },
        {
            "fullUrl": "https://claims.api.healthcode.co.uk/claim/201708230810157892FBL0792",
            "resource": {
                "resourceType": "Claim",
                "id": "201708230810157892FBL0792",
                "patient": {
                    "display": "DIXON MARGARET"
                },
                "insurer": {
                    "id": "PR000006",
                    "identifier": {
                        "system": "https://claims.api.healthcode.co.uk/insurer-id",
                        "value": "bcw"
                    },
                    "display": "Simplyhealth"
                },
                "procedure": [
                    {
                        "date": "2017-06-14T00:00:00+05:30"
                    }
                ],
                "item": [
                    {
                        "servicedDate": "2017-06-14",
                        "encounter": [
                            {
                                "id": "202206232248293671NMX0004"
                            }
                        ]
                    }
                ]
            }
        },
        {
            "fullUrl": "https://claims.api.healthcode.co.uk/claim/20170823081016883r0x70801/encounter/202206232248297751eIs0006",
            "resource": {
                "resourceType": "Encounter",
                "id": "202206232248297751eIs0006",
                "episodeOfCare": [
                    {
                        "extension": [
                            {
                                "url": "setting",
                                "valueString": "Outpatient"
                            }
                        ]
                    }
                ]
            }
        },
        {
            "fullUrl": "https://claims.api.healthcode.co.uk/claim/20170823081016883r0x70801",
            "resource": {
                "resourceType": "Claim",
                "id": "20170823081016883r0x70801",
                "patient": {
                    "display": "EVEREST BARBARA"
                },
                "insurer": {
                    "id": "PR000006",
                    "identifier": {
                        "system": "https://claims.api.healthcode.co.uk/insurer-id",
                        "value": "bcw"
                    },
                    "display": "Simplyhealth"
                },
                "procedure": [
                    {
                        "date": "2017-05-13T00:00:00+05:30"
                    }
                ],
                "item": [
                    {
                        "servicedDate": "2017-05-13",
                        "encounter": [
                            {
                                "id": "202206232248297751eIs0006"
                            }
                        ]
                    }
                ]
            }
        }
    ]
}

Error Handling

The API may return any error messages and will return empty bundle when no claims are found. 

Search Hospital Claims

This API allows the calling application to search hospital claims for which the service has already been rendered or provided. All the search parameters are mandatory to get the relevant claim.

Endpoint

Must be looked up from discovery-document using key search_hospital_claims_endpoint.

Request

curl --request GET 
	--url 'https://claims.api.dev.healthcode.co.uk/claim/search/$hospital-claim?
	dateCompleted=2017-08-23&
	treatmentSiteName=Renacres Hall Hospital&
	patientLastName=EVEREST&
	patientDateOfBirth=1953-08-03' 
--header 'Content-Type: application/fhir+json' 

Where,

FieldTypeDescription
dateCompletedDateDate when the services are rendered. Format: yyyy-MM-dd
treatmentSiteName StringTreatment site name
patientLastName StringPatient’s last name
patientDateOfBirth DatePatient’s date of birth. Format: yyyy-MM-dd

Response Processing

Below is the API response which returns the relevant claim.

{
    "resourceType": "Bundle",
    "meta": {
        "tag": [
            {
                "code": "count",
                "display": "1"
            },
            {
                "code": "page",
                "display": "1"
            },
            {
                "code": "maxCount",
                "display": "1"
            }
        ]
    },
    "type": "collection",
    "total": 2,
    "entry": [
        {
            "fullUrl": "https://claims.api.healthcode.co.uk/claim/20170823081016883r0x70801/encounter/202206232248297751eIs0006",
            "resource": {
                "resourceType": "Encounter",
                "id": "202206232248297751eIs0006",
                "episodeOfCare": [
                    {
                        "extension": [
                            {
                                "url": "setting",
                                "valueString": "Outpatient"
                            }
                        ]
                    }
                ]
            }
        },
        {
            "fullUrl": "https://claims.api.healthcode.co.uk/claim/20170823081016883r0x70801",
            "resource": {
                "resourceType": "Claim",
                "id": "20170823081016883r0x70801",
                "patient": {
                    "display": "EVEREST BARBARA"
                },
                "insurer": {
                    "id": "PR000006",
                    "identifier": {
                        "system": "https://claims.api.healthcode.co.uk/insurer-id",
                        "value": "bcw"
                    },
                    "display": "Simplyhealth"
                },
                "procedure": [
                    {
                        "date": "2017-05-13T00:00:00+05:30"
                    }
                ],
                "item": [
                    {
                        "servicedDate": "2017-05-13",
                        "encounter": [
                            {
                                "id": "202206232248297751eIs0006"
                            }
                        ]
                    }
                ]
            }
        }
    ]
}

Error Handling

The API may return any error messages and will return empty bundle when no claims are found. 

Search Bills

This API allows the calling application to search bills for the specified insurer and return the list of bills as per search parameters.

Endpoint

Must be looked up from discovery-document using key search_claim_endpoint.

Request

curl --request 
	--url GET 'https://claims.api.dev.healthcode.co.uk/claim/search?
	insurerid=bup' 
--header 'Content-Type: application/fhir+json' 

Where,

FieldTypeDescription
insurerid StringInsurer for which the claim details required. Mandatory field
membershipNumberStringMembership number
invoiceNumber StringInvoice number
cuidStringCUID

Response Processing

Below is the API response which returns the relevant claim.

{
    "resourceType": "Bundle",
    "meta": {
        "tag": [
            {
                "code": "count",
                "display": "2"
            },
            {
                "code": "page",
                "display": "1"
            },
            {
                "code": "maxRecords",
                "display": "7112"
            }
        ]
    },
    "type": "searchset",
    "total": 2,
    "entry": [
        {
            "resource": {
                "resourceType": "Claim",
                "id": "202204191733007740Cwq0011",
                "contained": [
                    {
                        "resourceType": "Encounter",
                        "id": "1"
                    },
                    {
                        "resourceType": "Invoice",
                        "id": "2",
                        "identifier": {
                            "id": "InvoiceNumber",
                            "system": "https://ref.api.healthcode.co.uk/Invoice",
                            "value": "190422a"
                        },
                        "date": "2022-04-19T00:00:00+00:00",
                        "totalNet": {
                            "value": 100
                        }
                    },
                    {
                        "resourceType": "Patient",
                        "id": "3",
                        "identifier": [
                            {
                                "id": "NHSNumber",
                                "value": "Unknown"
                            },
                            {
                                "id": "BMI",
                                "value": "Unknown"
                            }
                        ],
                        "name": [
                            {
                                "family": "BUPA",
                                "given": [
                                    "PATIENT"
                                ]
                            }
                        ],
                        "gender": "unknown",
                        "generalPractitioner": [
                            {
                                "reference": "#4"
                            }
                        ]
                    },
                    {
                        "resourceType": "Practitioner",
                        "id": "4",
                        "identifier": [
                            {
                                "id": "GPCode",
                                "value": "00050228"
                            },
                            {
                                "id": "GPPracticeCode",
                                "value": "Unknown"
                            }
                        ],
                        "name": [
                            {
                                "given": [
                                    "Unknown"
                                ]
                            }
                        ]
                    },
                    {
                        "resourceType": "Coverage",
                        "id": "5",
                        "subscriberId": "0050886298"
                    }
                ],
                "extension": [
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/IsArchived",
                        "valueString": "1"
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/ClaimStatus",
                        "valueString": "Live"
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Encounter/EventReference",
                        "valueReference": {
                            "id": "Encounter",
                            "reference": "#1"
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/InvoiceReference",
                        "valueReference": {
                            "id": "Invoice",
                            "reference": "#2"
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/DoubleInsurance",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://ref.api.healthcode.co.uk/DoubleInsurance",
                                    "code": "U",
                                    "display": "U"
                                }
                            ]
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/ThirdParty",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://ref.api.healthcode.co.uk/ThirdParty",
                                    "code": "U",
                                    "display": "U"
                                }
                            ]
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/PackageDeal",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://ref.api.healthcode.co.uk/PackageDeal",
                                    "code": "N",
                                    "display": "N"
                                }
                            ]
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/Currency",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://ref.api.healthcode.co.uk/currency",
                                    "code": "GBP",
                                    "display": "GBP"
                                }
                            ]
                        }
                    }
                ],
                "patient": {
                    "id": "Patient",
                    "reference": "#3"
                },
                "created": "2022-04-19T17:33:00+00:00",
                "priority": {
                    "coding": [
                        {
                            "system": "http://hl7.org/fhir/processpriority",
                            "code": "normal",
                            "display": "Normal"
                        }
                    ]
                },
                "insurance": [
                    {
                        "coverage": {
                            "id": "Coverage",
                            "reference": "#5"
                        }
                    }
                ],
                "total": {
                    "value": 100,
                    "code": "GBP"
                }
            }
        },
        {
            "resource": {
                "resourceType": "Claim",
                "id": "202204191634321503fUy0006",
                "contained": [
                    {
                        "resourceType": "Encounter",
                        "id": "1"
                    },
                    {
                        "resourceType": "Invoice",
                        "id": "2",
                        "identifier": {
                            "id": "InvoiceNumber",
                            "system": "https://ref.api.healthcode.co.uk/Invoice",
                            "value": "J00188"
                        },
                        "date": "2022-04-19T00:00:00+00:00",
                        "totalNet": {
                            "value": 100
                        }
                    },
                    {
                        "resourceType": "Patient",
                        "id": "3",
                        "identifier": [
                            {
                                "id": "NHSNumber",
                                "value": "Unknown"
                            },
                            {
                                "id": "BMI",
                                "value": "Unknown"
                            }
                        ],
                        "name": [
                            {
                                "family": "BUPA",
                                "given": [
                                    "PATIENT"
                                ]
                            }
                        ],
                        "gender": "unknown",
                        "generalPractitioner": [
                            {
                                "reference": "#4"
                            }
                        ]
                    },
                    {
                        "resourceType": "Practitioner",
                        "id": "4",
                        "identifier": [
                            {
                                "id": "GPCode",
                                "value": "00050228"
                            },
                            {
                                "id": "GPPracticeCode",
                                "value": "Unknown"
                            }
                        ],
                        "name": [
                            {
                                "given": [
                                    "Unknown"
                                ]
                            }
                        ]
                    },
                    {
                        "resourceType": "Coverage",
                        "id": "5",
                        "subscriberId": "0050886298"
                    }
                ],
                "extension": [
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/IsArchived",
                        "valueString": "1"
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/ClaimStatus",
                        "valueString": "Live"
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Encounter/EventReference",
                        "valueReference": {
                            "id": "Encounter",
                            "reference": "#1"
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/InvoiceReference",
                        "valueReference": {
                            "id": "Invoice",
                            "reference": "#2"
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/DoubleInsurance",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://ref.api.healthcode.co.uk/DoubleInsurance",
                                    "code": "U",
                                    "display": "U"
                                }
                            ]
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/ThirdParty",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://ref.api.healthcode.co.uk/ThirdParty",
                                    "code": "U",
                                    "display": "U"
                                }
                            ]
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/PackageDeal",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://ref.api.healthcode.co.uk/PackageDeal",
                                    "code": "N",
                                    "display": "N"
                                }
                            ]
                        }
                    },
                    {
                        "url": "https://ref.api.healthcode.co.uk/extension/Claim/Currency",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://ref.api.healthcode.co.uk/currency",
                                    "code": "GBP",
                                    "display": "GBP"
                                }
                            ]
                        }
                    }
                ],
                "patient": {
                    "id": "Patient",
                    "reference": "#3"
                },
                "created": "2022-04-19T16:34:32+00:00",
                "priority": {
                    "coding": [
                        {
                            "system": "http://hl7.org/fhir/processpriority",
                            "code": "normal",
                            "display": "Normal"
                        }
                    ]
                },
                "insurance": [
                    {
                        "coverage": {
                            "id": "Coverage",
                            "reference": "#5"
                        }
                    }
                ],
                "total": {
                    "value": 100,
                    "code": "GBP"
                }
            }
        }
    ]
}

Error Handling

The API may return any error messages and will return empty bundle when no claims are found.

Get Bill

This API allows the calling application to get bill for specified claim.

Endpoint

Must be looked up from discovery-document using key get_claim_endpoint.

Request

curl --request 
	--url GET 'https://claims.api.dev.healthcode.co.uk/claim/{claimId}/true' 
--header 'Content-Type: application/fhir+json'

Where,

FieldTypeDescription
claimId StringInsurer id. Mandatory field
isArchivedStringTrue/False expected value to identify the claim is archived or not.

Response Processing

Below is the API response which returns the relevant claim.

{
    "resourceType": "Claim",
    "id": "NULL",
    "contained": [
        {
            "resourceType": "Encounter",
            "id": "1",
            "extension": [
                {
                    "url": "https://ref.api.healthcode.co.uk/extension/Encounter/InpaientNights",
                    "valueString": "0"
                },
                {
                    "url": "https://ref.api.healthcode.co.uk/extension/Encounter/Setting",
                    "valueString": "O"
                },
                {
                    "url": "https://ref.api.healthcode.co.uk/extension/Encounter/FirstAwareDate",
                    "valueString": "2002-06-01 00:00:00.0"
                },
                {
                    "url": "https://ref.api.healthcode.co.uk/extension/Encounter/FirstGPVisitDate",
                    "valueString": "2002-08-03 00:00:00.0"
                }
            ],
            "participant": [
                {
                    "individual": {
                        "reference": "Practitioner/00021799"
                    }
                }
            ],
            "period": {
                "start": "1653-02-10T06:13:20+00:00",
                "end": "1653-02-10T06:13:20+00:00"
            },
            "diagnosis": [
                {
                    "condition": {
                        "reference": "Diagnosis/72300"
                    }
                }
            ],
            "serviceProvider": {
                "reference": "Organization/60000151"
            }
        },
        {
            "resourceType": "Invoice",
            "id": "2",
            "extension": [
                {
                    "url": "https://ref.api.healthcode.co.uk/extension/Invoice/CompanyPaid",
                    "valueString": "0"
                },
                {
                    "url": "https://ref.api.healthcode.co.uk/extension/Invoice/FromDate",
                    "valueDate": "1653-02-10"
                },
                {
                    "url": "https://ref.api.healthcode.co.uk/extension/Invoice/ToDate",
                    "valueDate": "1653-02-10"
                },
                {
                    "url": "https://ref.api.healthcode.co.uk/extension/Invoice/ExcessPaid",
                    "valueString": "0"
                },
                {
                    "url": "https://ref.api.healthcode.co.uk/extension/Invoice/InvoiceReference",
                    "valueString": "0099589/003"
                }
            ],
            "identifier": {
                "id": "InvoiceNumber",
                "system": "https://ref.api.healthcode.co.uk/Invoice",
                "value": "153744"
            },
            "recipient": [
                {
                    "reference": "60000151"
                }
            ],
            "date": "2002-10-08T00:00:00+00:00",
            "totalPriceComponent": [
                {
                    "type": "discount",
                    "amount": {
                        "id": "DiscountTotal",
                        "value": 0
                    }
                }
            ],
            "totalNet": {
                "value": 601
            },
            "totalGross": {
                "value": 601
            }
        },
        {
            "resourceType": "Patient",
            "id": "3",
            "identifier": [
                {
                    "id": "ProviderPatientId",
                    "value": "Unknown"
                },
                {
                    "id": "NHSNumber",
                    "value": "Unknown"
                },
                {
                    "id": "BMI",
                    "value": "Unknown"
                }
            ],
            "name": [
                {
                    "family": "Knights",
                    "given": [
                        "SUSAN"
                    ]
                }
            ],
            "gender": "female",
            "birthDate": "1956-11-16",
            "address": [
                {
                    "line": [
                        "Yarnton"
                    ]
                },
                {
                    "postalCode": "OX5 1TA"
                }
            ],
            "generalPractitioner": [
                {
                    "reference": "#4"
                }
            ]
        },
        {
            "resourceType": "Practitioner",
            "id": "4",
            "identifier": [
                {
                    "id": "GPCode",
                    "value": "Unknown"
                },
                {
                    "id": "GPPracticeCode",
                    "value": "Unknown"
                }
            ],
            "name": [
                {
                    "given": [
                        "Dr David J Evans"
                    ]
                }
            ],
            "address": [
                {
                    "line": [
                        "Kidlington Health Centre"
                    ]
                },
                {
                    "postalCode": "OX5 1AP"
                }
            ]
        },
        {
            "resourceType": "Coverage",
            "id": "5",
            "subscriberId": "2540012D",
            "period": {
                "end": "1653-02-10T06:13:20+00:00"
            }
        }
    ],
    "extension": [
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/ClaimStatus",
            "valueString": "Live"
        },
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/DiagnosisScheme",
            "valueCodeableConcept": {
                "coding": [
                    {
                        "system": "https://ref.api.healthcode.co.uk/DiagnosisScheme",
                        "code": "ICD9",
                        "display": "ICD9"
                    }
                ]
            }
        },
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Encounter/EventReference",
            "valueReference": {
                "id": "Encounter",
                "reference": "#1"
            }
        },
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/InvoiceReference",
            "valueReference": {
                "id": "Invoice",
                "reference": "#2"
            }
        },
        {
            "id": "MR1100",
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/ServiceSetting",
            "valueString": "O"
        },
        {
            "id": "MR1100",
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/ServiceProvider",
            "valueString": "60000151"
        },
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/ClaimSource",
            "valueCodeableConcept": {
                "coding": [
                    {
                        "system": "https://ref.api.healthcode.co.uk/ClaimSource",
                        "code": "H",
                        "display": "H"
                    }
                ]
            }
        },
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/DoubleInsurance",
            "valueCodeableConcept": {
                "coding": [
                    {
                        "system": "https://ref.api.healthcode.co.uk/DoubleInsurance",
                        "code": "N",
                        "display": "N"
                    }
                ]
            }
        },
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/ThirdParty",
            "valueCodeableConcept": {
                "coding": [
                    {
                        "system": "https://ref.api.healthcode.co.uk/ThirdParty",
                        "code": "N",
                        "display": "N"
                    }
                ]
            }
        },
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/PackageDeal",
            "valueCodeableConcept": {
                "coding": [
                    {
                        "system": "https://ref.api.healthcode.co.uk/PackageDeal",
                        "code": "N",
                        "display": "N"
                    }
                ]
            }
        },
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/SignatureRequired",
            "valueCodeableConcept": {
                "coding": [
                    {
                        "system": "https://ref.api.healthcode.co.uk/SignatureIndicator",
                        "code": "2",
                        "display": "2"
                    }
                ]
            }
        },
        {
            "url": "https://ref.api.healthcode.co.uk/extension/Claim/Currency",
            "valueCodeableConcept": {
                "coding": [
                    {
                        "system": "https://ref.api.healthcode.co.uk/currency",
                        "code": "GBP",
                        "display": "GBP"
                    }
                ]
            }
        }
    ],
    "patient": {
        "id": "Patient",
        "reference": "#3"
    },
    "created": "2002-10-08T00:00:00+00:00",
    "provider": {
        "reference": "Practitioner/60000151"
    },
    "priority": {
        "coding": [
            {
                "system": "http://hl7.org/fhir/processpriority",
                "code": "normal",
                "display": "Normal"
            }
        ]
    },
    "insurance": [
        {
            "coverage": {
                "id": "Coverage",
                "reference": "#5"
            }
        }
    ],
    "item": [
        {
            "id": "MR1100",
            "sequence": 0,
            "modifier": [
                {
                    "coding": [
                        {
                            "code": "O",
                            "display": "ServiceSetting"
                        }
                    ]
                }
            ],
            "servicedPeriod": {
                "start": "2002-10-07T00:00:00+00:00",
                "end": "2002-10-07T00:00:00+00:00"
            },
            "quantity": {
                "value": 1
            },
            "unitPrice": {
                "id": "GrossTotal",
                "value": 601
            },
            "net": {
                "id": "NetTotal",
                "value": 601
            },
            "detail": [
                {
                    "net": {
                        "id": "DiscountTotal",
                        "value": 0
                    }
                },
                {
                    "net": {
                        "id": "VatTotal",
                        "value": 0
                    }
                },
                {
                    "net": {
                        "id": "VatRate",
                        "code": "0"
                    }
                },
                {
                    "net": {
                        "id": "VatIndicator",
                        "code": "E"
                    }
                }
            ]
        }
    ],
    "total": {
        "value": 601,
        "code": "GBP"
    }
}

Error Handling

The API may return any error messages and will return empty bundle when no claims are found.