Skip to main content

json_dump

A JSON dump of the patient's FHIR R4 resources.

Classes​

JSONDumpReader​

class JSONDumpReader():

Writes a JSON dump of the patient's resources.

Methods​


produce_json_dump​

def produce_json_dump(    self,    save_path: Path,    elements_to_dump: Container[str] = frozenset({'procedures', 'patientInfo', 'encounters', 'medications', 'chart', 'appointments', 'conditions'}),) ‑> bitfount.externals.ehr.fhir_r4.readers.json_dump._FHIRR4PatientJSONDump:

Produce a JSON dump of patient information for the target patient.

Saves the JSON dump out to file and the contents can be controlled by elements_to_dump.

The following options are recognised:

  • "patientInfo": /Patient
  • "appointments": /Appointment (not always available)
  • "conditions": /Conditions
  • "encounters": /Encounters
  • "medications": /MedicationRequest
  • "procedures": /Procedures

Arguments

  • save_path: The file location to save the JSON dump to.
  • elements_to_dump: Collection of elements to include in the dump. See above for what options can be included.

Returns The assembled JSON dump. Elements that could not be retrieved (or that the server does not support) are omitted, so callers can inspect the result to decide whether the dump contains anything meaningful.