Updating a current patient record

Patient Sync (no longer in-use)

Updates to patient records are fetched via RSS.importFeed.

Start w/ the patient object and compare the non-Collections items (strings and ints). Then check the following collection items:

  • patientStatusreport
  • sessionPatient
  • pregnancyList
    • Loop through encounters. Check if the uuid for each encounter is in the database; if not, add the new encounter.
  • patientRegistration - refers to instance in pregnancyList, so it will already be handled.
  • Deletions are handled the same way. ProblemArchive, OutcomeArchive,and EncounterDataArchive have uuid's of the objects they are deleting.
  • Problems and system generated outcomes work the same way - loop through those objects, check if the uuid is in the database, add new objects.

Any changes to encounters are handled by looping through the EncounterValueArchive list.

Sample code for processing objects using uuid's.