dde_mahis 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98d52783d48cc54031d990aa9894e2c8f697e09959a007b72f8795fad7b1a393
4
- data.tar.gz: 9c1a6e58dbbbfaefb91e61431f931ef0aa126f075c31137d47fca27a5f3e1676
3
+ metadata.gz: 96a0bec80fc874696bf8c3116dfca7c25ab669cb783038db563af14f50516dc4
4
+ data.tar.gz: 92b9d28d0261fc3de5858611a742b17124e489299e2ef00ef8b08e10ead62025
5
5
  SHA512:
6
- metadata.gz: 8d3caa597ea2da540832b27bc4c7181d00f4004c3f7fa53b6f0e36409d9b0ffa733568b1244c0a8660479bdaec4061e779adb3ebb738c7c9c2cde716817f5b75
7
- data.tar.gz: 44cdbf6ef47069b8544a9d9dca89ade68c3b0cf375a4c6aa54f98d8e99e1ff01f152f338ea9f5e8de7f2afc0991313f8fe5d54644af4133839dffa8d69336886
6
+ metadata.gz: 365d1e56e450d9d0d2568b6f89953715fabcd414fe6405d19c6b693a8ba0ca71ba941ec1b43c7cf1afe46e994f22468c5dd042363f313ebfbda45660bf7c8772
7
+ data.tar.gz: 5857053d3a2e77a20739837350ac2d9ab07138b8c30e6c90b4e09b376b940ed16bea584508019c282419eea3b35e672fd173a88b0a85c16ad8faab118dff3573
@@ -1,6 +1,8 @@
1
1
  module DdeMahis
2
2
  class Api::V1::DdeController < ApplicationController
3
3
  # GET /dde/patients
4
+ after_action :remove_from_aetc_list, only: [:merge_patients]
5
+
4
6
  def find_patients_by_npid
5
7
  npid = params.require(:npid)
6
8
  render json: service.find_patients_by_npid(npid)
@@ -90,5 +92,16 @@ module DdeMahis
90
92
  def visit_type
91
93
  Program.find(params.require(:visit_type_id))
92
94
  end
95
+
96
+ def remove_from_aetc_list
97
+ primary_person = Person.includes(:names).find_by(uuid: params[:primary][:patient_id])
98
+ AetcVisitList.where(uuid: params[:secondary].first[:patient_id])
99
+ .update_all(uuid: primary_person.uuid,
100
+ patient_id: primary_person.person_id,
101
+ given_name: primary_person.names.first.given_name,
102
+ family_name: primary_person.names.first.family_name,
103
+ gender: primary_person.gender,
104
+ category: 'triage')
105
+ end
93
106
  end
94
- end
107
+ end
@@ -1,3 +1,3 @@
1
1
  module DdeMahis
2
- VERSION = "0.1.7"
2
+ VERSION = '0.1.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dde_mahis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - brian-mw
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-24 00:00:00.000000000 Z
11
+ date: 2025-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description:
55
+ description:
56
56
  email:
57
57
  - bmsyamboza@pedaids.org
58
58
  executables: []
@@ -92,7 +92,7 @@ metadata:
92
92
  homepage_uri: https://github.com/orgs/Malawi-Ministry-of-Health/dde-mahis
93
93
  source_code_uri: https://github.com/orgs/Malawi-Ministry-of-Health/dde-mahis
94
94
  changelog_uri: https://github.com/orgs/Malawi-Ministry-of-Health/dde-mahis/CHANGELOG.md
95
- post_install_message:
95
+ post_install_message:
96
96
  rdoc_options: []
97
97
  require_paths:
98
98
  - lib
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  requirements: []
110
110
  rubygems_version: 3.4.1
111
- signing_key:
111
+ signing_key:
112
112
  specification_version: 4
113
113
  summary: DDE stands for Demographics Data Exchange. Its main purpose is to manage
114
114
  patient IDs.