Method: DdeClient::DdeService#update_patient

Defined in:
app/services/dde_client/dde_service.rb

#update_patient(patient) ⇒ Object

Updates patient demographics in Dde.

Local patient is not affected in anyway by the update

Raises:



86
87
88
89
90
91
92
93
# File 'app/services/dde_client/dde_service.rb', line 86

def update_patient(patient)
  dde_patient = openmrs_to_dde_patient(patient)
  response, status = dde_client.post('update_person', dde_patient)

  raise DdeError, "Failed to update person in Dde: #{response}" unless status == 200

  patient
end