-
Notifications
You must be signed in to change notification settings - Fork 661
JSON Export
The JSON Export is somewhat close to a Synthea "object dump". It uses the Gson library to serialize instances of the Person
class into JSON. Each Person
is written into a single JSON file in a directory called json
, where ever Synthea is configured to output records.
Each JSON file will contain a single object with the following properties:
-
attributes
- theMap
of properties associated with thePerson
. There is a lot of information in this property. Some information is removed prior to export. See below for details. -
coverage
- thePerson
'sCoverageRecord
-
lastUpdated
- time in the simulation that thePerson
was last updated -
seed
- random seed used in generation -
record
orrecords
- APerson
'sHealthRecord
. If thePerson
has a singleHealthRecord
, then the property will be calledrecord
. If there are multiple, the property will be calledrecords
- Any java fields marked as
static
,transient
orvolatile
. These fields are often references to look up data structures. -
Person.attributes
with key names starting with "ehr_", containing "lookup" or containing "UUID".- The "ehr_" attributes are generated by the
ClinicalNoteExporter
and contain references to objects in theHealthRecord
, so nothing is really lost by dropping it. - "lookup" attributes are dropped because they contain look up tables.
- "UUID" attributes are dropped because they contain UUID generators, not UUIDs themselves. UUID generators in Synthea are problematic for JSON export, as they often contain a reference to the
Person
as a source of randomness. This creates a circular reference.
- The "ehr_" attributes are generated by the
-
Payer
export is limited to name and UUID. This eliminates many circular references and references to information held elsewhere. - Any instance of
Module
or anything that subclasses it gets skipped in the export.
Synthea stores the path an individual takes through each module in Person.attributes
. Each module history is stored in a key that is the name of the module. By default, module history is removed before export into JSON. It can be enabled through configuration.
If module history export is enabled, it will be available under the attributes
property. Each module will have history under a property that is its name. The history is a JSON Array. The objects in the array, each representing a state, have the following properties:
state_name
-
entered
(optional) -
exited
(optional)
exporter.json.export
set to true
to enable JSON Export. The default is false
.
exporter.json.include_module_history
set to true
to enable export of module history in Person.attributes
. The default is false
.