Skip to main content

Patient

Managing patient records in the Bingli API includes creating, updating, and retrieving patient data. These actions ensure the system maintains accurate and up-to-date patient details.


API Environments

Bingli provides multiple environments for different use cases:

  • Production EU: https://fhir-gateway.api.bingli.eu/tenant-api/patients/
  • Acceptance EU: https://fhir-gateway.api.acc.bingli.be/tenant-api/patients/
  • Production US: https://fhir-gateway.api.bingli.us/tenant-api/patients/

Creating a Patient

POST - Create Patient

Endpoint

https://fhir-gateway.api.acc.bingli.be/tenant-api/patients/

Description

This endpoint is used to create a new patient record in the Bingli system. The patient ID should be unique within your system.


Request Details

Headers

KeyValue
Content-Typeapplication/json
AuthorizationBearer JWTTOKEN

Body (Raw JSON)

{
"firstName": "Francis",
"lastName": "Rousseau",
"gender": "male",
"birthdate": "1998-02-11T11:39:37.764Z",
"language": "nl-be",
"email": "frr@mybingli.com",
"phone": {
"phoneNumber": "+32471810697",
"type": "mobile",
"countryIsoAlpha2": "BE"
},
"externalReference": "EXTERNAL-REF-123"
}

cURL Request

curl --location --request POST 'https://fhir-gateway.api.acc.bingli.be/tenant-api/patients/' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"firstName": "Francis",
"lastName": "Rousseau",
"gender": "male",
"birthdate": "1998-02-11T11:39:37.764Z",
"language": "nl-be",
"email": "frr@mybingli.com",
"phone": {
"phoneNumber": "+32471810697",
"type": "mobile",
"countryIsoAlpha2": "BE"
},
"externalReference": "EXTERNAL-REF-123"
}'

Parameters Explanation

  • firstName: Patient's first name(s).
  • lastName: Patient's last name.
  • gender: Patient's gender (male or female).
  • birthDate: Patient's date of birth (YYYY-MM-DD).
  • language: The preferred language of the patient.
  • email: Patient's email.
  • phone.phoneNumber: Patient's phone number.
  • phone.type: Patient's phone type. Can be mobile, landline, or cordless.
  • phone.countryIsoAlpha2: Patient's phone two-letter country code.
  • externalReference: Unique identifier for the patient in your system.

Fetching a Patient

GET - Retrieve Patient by ID

Endpoint

https://fhir-gateway.api.acc.bingli.be/tenant-api/patients/{PATIENT-ID}

GET - Retrieve Patient by External Reference

Endpoint

https://fhir-gateway.api.acc.bingli.be/tenant-api/patients/external-reference/{externalReference}

Description

Fetch an existing patient record by providing either the unique patient ID or the external reference. The external reference allows retrieval without needing to match patient details manually.

cURL Request (By ID)

curl --location 'https://fhir-gateway.api.acc.bingli.be/tenant-api/patients/{PATIENT-ID}' \
--header 'Authorization: Bearer <TOKEN>'

cURL Request (By External Reference)

curl --location 'https://fhir-gateway.api.acc.bingli.be/tenant-api/patients/external-reference/{externalReference}' \
--header 'Authorization: Bearer <TOKEN>'

Parameters Explanation

  • patientId: patientId given by the Create Patient endpoint.
  • externalReference: Unique identifier for the patient in your system.

Updating a Patient

PUT - Update Patient

Endpoint

https://fhir-gateway.api.acc.bingli.be/tenant-api/patients/{PATIENT-ID}

Description

Update an existing patient record with new details. After updating, you can fetch the patient again to verify the changes.

Request Details

Body (Raw JSON)

{
"firstName": "Francis",
"lastName": "Rousseau",
"gender": "male",
"birthdate": "1998-02-11T11:39:37.764Z",
"language": "nl-be",
"email": "frr@mybingli.com",
"phone": {
"phoneNumber": "+32471810697",
"type": "mobile",
"countryIsoAlpha2": "BE"
},
"externalReference": "EXTERNAL-REF-123"
}

cURL Request

curl --location --request PUT 'https://fhir-gateway.api.acc.bingli.be/tenant-api/patients/{PATIENT-ID}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"firstName": "Francis",
"lastName": "Rousseau",
"gender": "male",
"birthdate": "1998-02-11T11:39:37.764Z",
"language": "nl-be",
"email": "frr@mybingli.com",
"phone": {
"phoneNumber": "+32471810697",
"type": "mobile",
"countryIsoAlpha2": "BE"
},
"externalReference": "EXTERNAL-REF-123"
}'

Parameters Explanation

  • patientId: patientId given by the Create Patient endpoint.
  • firstName: Patient's first name(s).
  • lastName: Patient's last name.
  • gender: Patient's gender (male or female).
  • birthDate: Patient's date of birth (YYYY-MM-DD).
  • language: The preferred language of the patient.
  • email: Patient's email.
  • phone.phoneNumber: Patient's phone number.
  • phone.type: Patient's phone type. Can be mobile, landline, or cordless.
  • phone.countryIsoAlpha2: Patient's phone two-letter country code.
  • externalReference: Unique identifier for the patient in your system.

Conclusion

Managing patient records through the Bingli API allows seamless interaction and ensures accurate data. The use of external references simplifies patient retrieval without needing direct patient ID matching. For further details, refer to the Bingli API Documentation or contact support@mybingli.com.