Class Description
ImportFeedAction imports a feed based on the parameters sent in the request.
- It opens a connection to the server it’s importing the files from and downloads the rss file and then checks when the patient was last updated, checking if the last_modified field in patient_status for each patient is equal to pubDate value in rss file.
- Downloads the patient xml files for the patients that were recently updated.
XmlUtils.importPatientRecord imports the patient record.
PatientDAO.updateImportData updates the patient metadata if the import or update was successful.
- Check for duplicate zeprs id’s (patient.district_id).. If duplicate, updatePatientRecord
- updateEncounterValues - Loops through patient.getEncounterRecordChanges and processes all of the changes to the patient record.
- If new patient:
- Insert new record in patient table
- Save Patient Registration encounter.
- Create the entry in patient_status table
- Be aware that the process of importing a mother differs slightly from importing a child.
- Loop through each pregnancy and insert all encounters via PopulatePatientRecord.importForm.
- Loop through the outcomes and insert new outcomes This also inserts any comments attached to each outcome.
- Loop through the problems and insert new problems. This also inserts any comments attached to each problem.
- Import the Partograph
- Update patient_status table.
UpdateLogDAO.save logs the update.
- Printer-friendly version
- Login to post comments
- PDF version