Method: DdeClient::DdeService#import_patients_by_npid
- Defined in:
- app/services/dde_client/dde_service.rb
#import_patients_by_npid(npid) ⇒ Object
Imports patients from Dde to the local database
150 151 152 153 154 155 156 |
# File 'app/services/dde_client/dde_service.rb', line 150 def import_patients_by_npid(npid) doc_id_type = patient_identifier_type('National id') locals = patient_service.find_patients_by_identifier(npid, doc_id_type).limit(PATIENT_SEARCH_RESULTS_LIMIT) remotes = find_remote_patients_by_npid(npid) import_remote_patient(locals, remotes) end |