Troubleshooting patients
What goes wrong with patient records, and the fix for each.
Read the response body first. A failed request has code: false and the message in error. A successful one can still carry a warning in description.
Searching
The search returns nobody
- Cause: The filters are too narrow, or the patient is inactive or marked as a non-patient and you filtered those out.
date_of_birthis an exact match.emailandphone_numbermatch only what the office saved. - Fix: Search by
nameanddate_of_birthfirst.nameis a fuzzy match. Addemailandphone_numberto widen the search, not to narrow it. Dropinactive=falseandnon_patient=falseto see every record, then decide.
The search returns patients from another office
- Cause: Several locations share one health record system server. Without
location_strict=true,GET /patientssearches the whole server. - Fix: Send
location_strict=true. To see where a patient belongs, readlocation_idsonGET /patients/{id}.
Note that following parameters are ignored: location_id. in description on GET /patients/{id}
- Cause:
location_idis not a parameter on this endpoint. The request still succeeds. - Fix: Leave
location_idoff. Readlocation_idsin the response instead.
The same person shows up twice
- Cause: The office has two records for the patient, or one record is the
new_patientplaceholder from an API booking and the other is the record the office created afterwards. - Fix: Filter with
new_patient=falseto drop placeholders. For true duplicates, ask the office to merge the records in the health record system. Do not create a third record.
Creating
A patient with that information already exists -id=123 on POST /patients
- Cause: A patient with the same date of birth, name and phone number exists in NexHealth or in the health record system.
123is their ID. - Fix: Use that patient. Send
return_existing_if_match: trueto get the existing record back with a200instead of the error. Let the patient or the office confirm the match before you book.
400 with a field error on POST /patients
- Cause: A required field is missing or malformed.
first_name,last_name,email,bio.date_of_birth,bio.phone_numberandprovider.provider_idare required. The email has to be a valid address. The date of birth cannot be in the future or more than 130 years in the past. - Fix: Send every required field. Use
YYYY-MM-DDfor the date of birth.
The name was cut short in the health record system
- Cause: Some systems limit first names to 15 characters and last names to 20.
- Fix: Keep names inside those limits.
The gender is wrong in the health record system
- Cause:
bio.genderwas left out, so it defaulted toFemale. The default exists so every system accepts the record. - Fix: Send
bio.genderwhen you have it. The office updates it at the first visit.
Data source must exist on POST /patients/{id}/alerts
- Cause: The patient exists only in NexHealth. Their
foreign_idisnullandforeign_id_typeisnex. A patient created through the API is written into the health record system with their first appointment. - Fix: Book the patient's first appointment, wait for
appointment_insertion.complete, then add the alert.
Patient with id 123 not found on POST /appointments
- Cause: The patient was created through the API for one location and their first appointment is going to another location.
- Fix: Book the first appointment at the location where you created the patient.
Cannot create an appointment where the patient attribute new_patient=true on POST /appointments
- Cause: Dentrix and Denticon. A new patient exists only on their first appointment until the office makes them a patient of record. Their
foreign_idends in_np. - Fix: Ask the office to convert the patient in the health record system. On Dentrix, you can move the first appointment with
PATCH /appointments/{id}until then.
Keeping a copy
The patient never appears in the health record system
- Cause: The patient is stored in NexHealth only. The write happens with the first appointment, and that appointment was not written. Its
foreign_idisnull. - Fix: Check for
appointment_insertion.failedandappointment_insertion.timed_out. See Troubleshooting appointment writes.
Your copy of a patient is stale
- Cause: You are polling without
updated_since, or the sync has not read the office's change yet. NexHealth reads on-premises systems every 10 to 15 minutes, and gaps are longer overnight and on weekends. - Fix: Subscribe to
patient_updated. If you poll, pass the time of your last run asupdated_sinceand sort byupdated_at. Checkread_status_atonGET /sync_statusto see when the last read happened.
A patient you stored is gone
- Cause: It was a
new_patientplaceholder. When the office created the real record and NexHealth read it, NexHealth linked the records and deleted the placeholder. - Fix: Treat
new_patient: truerecords as temporary. Subscribe topatient_updatedandpatient_createdso your copy follows the change.
Still stuck
Email [email protected] with the request, the full response body, the subdomain, the location_id and the time of the call in UTC. Every message the API returns is in the Errors reference.
Updated about 1 hour ago