Class: Renalware::Patients::SyncODSJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/models/renalware/patients/sync_ods_job.rb

Overview

A background job to fetch practice and GP updates from the NHS Organisation Data Service (ODS) The order in which we fetch data is neccessarily strict in order to build the relationships:

  1. Practices

  2. GPS

  3. Practice memberships

Instance Method Summary collapse

Instance Method Details

#perform(dry_run: false) ⇒ Object

If dry_run: true when we should not save any changes.



24
25
26
27
# File 'app/models/renalware/patients/sync_ods_job.rb', line 24

def perform(dry_run: false)
  sync_practices(dry_run)
  sync_gps_and_memberships(dry_run)
end