dde_client 1.0.1 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1379dea635f856772b3889760d6e31f0dcce511cd18e43162be3ba193d3faa0f
4
- data.tar.gz: 75ddf382c9325d6c9aac106112b8da62a9b30102e86ebaea4952802645de8576
3
+ metadata.gz: cad934bbdf5a932fda77d52cd316d3806338cad05862a032691394d49cc6f479
4
+ data.tar.gz: 3d13bba00ba0fc220629bf56a38623e68ea404105e2f3bc1b1e822c318a2025a
5
5
  SHA512:
6
- metadata.gz: e17b9eb6c41fc42ddd48710c718bd4beaedea5a5ea351cecacd76f29564a2f2a69cdaf3a19d5b5fa1af539d05f3de446d6175681e52205942818ea9e4c3db16a
7
- data.tar.gz: 7dc418bd776cfa94acab1c6c5c8d6aa68d10c24f77541fbad87acdd1ef4a73d829ab81708f5646ad279061426fe3fa82d743b6a87b9fa06b62a286ab5b935d60
6
+ metadata.gz: 74db7dbfe6353378f324ef8b52b5e623ff381ea7a25e37091499a4b36c9c74001abef5e269d6ea2492c1b15359184f34ef1162033227f47ad24dc58eb554649f
7
+ data.tar.gz: a7751a28f201954f0d4e5a81e39c8fb04d29dabef78a34107de6d29d6e8928a45bab0a96484cbb5ebeff839e5010e7331648cd145fa96151bbcd8ead4ec83f61
@@ -385,7 +385,8 @@ class DdeClient::DdeService
385
385
  # whose NPID has changed, we need to find and resolve these local patients.
386
386
  unresolved_patients = find_patients_by_doc_id(patients[:remotes].collect { |remote_patient| remote_patient['doc_id'] })
387
387
  if unresolved_patients.empty?
388
- return { locals: patients[:locals], remotes: patients[:remotes].collect { |patient| localise_remote_patient(patient) } }
388
+ patients = { locals: patients[:locals], remotes: patients[:remotes].collect { |patient| localise_remote_patient(patient) } }
389
+ return patients
389
390
  end
390
391
 
391
392
  additional_patients = resolve_patients(local_patients: unresolved_patients, remote_patients: patients[:remotes])
@@ -434,7 +435,6 @@ class DdeClient::DdeService
434
435
 
435
436
  resolved_patients << local_patient
436
437
  end
437
-
438
438
  if resolved_patients.empty? && (local_patients.size.zero? && remote_patients.size == 1)
439
439
  # HACK: Frontenders requested that if only a single patient exists
440
440
  # remotely and locally none exists, the remote patient should be
@@ -486,16 +486,16 @@ class DdeClient::DdeService
486
486
  # Converts a remote patient coming from Dde into a structure similar
487
487
  # to that of a local patient
488
488
  def localise_remote_patient(patient)
489
- Patient.new(
489
+ {
490
490
  patient_identifiers: localise_remote_patient_identifiers(patient),
491
- person: Person.new(
491
+ person: {
492
492
  names: localise_remote_patient_names(patient),
493
493
  addresses: localise_remote_patient_addresses(patient),
494
494
  birthdate: patient['birthdate'],
495
495
  birthdate_estimated: patient['birthdate_estimated'],
496
496
  gender: patient['gender']
497
- )
498
- )
497
+ }
498
+ }
499
499
  end
500
500
 
501
501
  def localise_remote_patient_identifiers(remote_patient)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DdeClient
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dde_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - bryan-mw
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-11 00:00:00.000000000 Z
11
+ date: 2024-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails