Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cicd_process.yml #1919

Open
wants to merge 172 commits into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
1e2a8c5
Add support for platform 2.6.0
jecihjoy Jun 9, 2023
2f2627c
Module upgrade
jecihjoy Jun 12, 2023
fd30dad
Added a chore to migrate patient conditions
jecihjoy Jun 21, 2023
aae3e2b
Added a chore to migrate patient allergies
jecihjoy Jun 21, 2023
57ca2de
Merge pull request #1578 from jecihjoy/migrate-conditions-chore
ojwanganto Jun 22, 2023
6f7c13f
Merge pull request #1579 from jecihjoy/migrate-allergies-chore
ojwanganto Jun 22, 2023
329cca6
Post upgrade changes
jecihjoy Jul 4, 2023
e0f7eb5
Merge pull request #1561 from jecihjoy/openmrs-2.6.0-upgrade
makombe Jul 5, 2023
c86de08
Merge branch 'openmrs-2.6.x-upgrade' into migrate-conditions-chore
jecihjoy Jul 5, 2023
789f81f
Merge pull request #1589 from jecihjoy/migrate-conditions-chore
makombe Jul 5, 2023
fc8061a
Update referredAndLinkedSinceThreeMonthsAgo clients query to support …
jecihjoy Aug 21, 2023
acab982
Merge pull request #1641 from jecihjoy/openmrs-2.6.0-upgrade
makombe Aug 22, 2023
b9c4256
Added a chore to migrate patient conditions
jecihjoy Jun 21, 2023
d344454
Added a chore to migrate patient allergies
jecihjoy Jun 21, 2023
08d72a0
Post upgrade changes
jecihjoy Jul 4, 2023
e640153
Add support for platform 2.6.0
jecihjoy Jun 9, 2023
fd366e0
Update referredAndLinkedSinceThreeMonthsAgo clients query to support …
jecihjoy Aug 21, 2023
12a8f68
Merge pull request #1653 from jecihjoy/openmrs-2.6.0-upgrade
jecihjoy Sep 4, 2023
ff1c04d
Added a chore to migrate patient conditions
jecihjoy Jun 21, 2023
787cfbc
Added a chore to migrate patient allergies
jecihjoy Jun 21, 2023
1e0f21e
Post upgrade changes
jecihjoy Jul 4, 2023
5fddc8b
Update referredAndLinkedSinceThreeMonthsAgo clients query to support …
jecihjoy Aug 21, 2023
76c1fe8
Add support for platform 2.6.0
jecihjoy Jun 9, 2023
a1e4bdb
Upgrade to omrs 2.6.2 with encounter diagnosis support
Oct 3, 2023
47a7cc5
Merge branch 'openmrs-2.6.x-upgrade' into openmrs-2.6.x-upgrade
jecihjoy Oct 3, 2023
1d3bee0
Merge pull request #1682 from jecihjoy/openmrs-2.6.x-upgrade
makombe Oct 3, 2023
3cb7eb5
(feat) Check for specific appointment forms before syncing to bahmni
CynthiaKamau Aug 9, 2023
6825399
Merge pull request #1683 from makombe/appointments-check-sync
jecihjoy Oct 3, 2023
af9e09e
Added new facility named Kineni Health centre in Kisii
PatrickWaweru Oct 5, 2023
37751fe
(fix) Fix null pointer in encounter while syncing appointments to bahmni
CynthiaKamau Oct 16, 2023
16211cd
Merge pull request #1704 from CynthiaKamau/cherry-pick-appointment-np
makombe Oct 16, 2023
1e4b58c
Fix NEP on sync
makombe Oct 17, 2023
2204d67
Merge pull request #1710 from makombe/nep
makombe Oct 17, 2023
feb5f49
Merge branch 'master' into openmrs-2.6.x-upgrade
makombe Oct 18, 2023
24a551f
Merge pull request #1718 from makombe/update-2.6-with-latest-master
CynthiaKamau Oct 23, 2023
f428a64
Merge pull request #1686 from CynthiaKamau/openmrs-2.6.x-upgrade
patryllus Oct 27, 2023
01b62d4
Redirected registration page to new 03 registration
CynthiaKamau Mar 8, 2023
97c9148
Merge pull request #1736 from makombe/disable-reg-2x
CynthiaKamau Oct 31, 2023
30aad2c
Merge branch 'master' into update-2.6
makombe Nov 7, 2023
53425b2
Merge pull request #1748 from makombe/update-2.6
makombe Nov 7, 2023
fd7a0d2
Added HTS entry point in HTS prediction report, switched reporting to…
patryllus Nov 7, 2023
d86adf5
Add missing concepts on entry point string in care panels
CynthiaKamau Nov 7, 2023
90abbe1
Add missing closing tags
CynthiaKamau Nov 15, 2023
95f3588
Add AZT/3TC/DTG adult third line regimen
makombe Nov 17, 2023
1e23651
(fix) Update discontinuationFormName to correct value
donaldkibet Nov 18, 2023
9e699aa
Merge pull request #1761 from makombe/cherry-chages-from-master
makombe Nov 18, 2023
bf05f9e
Merge branch 'openmrs-2.6.x-upgrade' into master-latest
jecihjoy Dec 21, 2023
2738ef0
Merge pull request #1775 from palladiumkenya/master-latest
jecihjoy Dec 21, 2023
c0e63d5
PMTCT_EID, PMTCT_HEI - Aligned age brackets. TX_TB - Changed addition…
njorocs Dec 21, 2023
16a47fa
add inpatient visit type
ojwanganto Jan 17, 2024
bbc9d41
add configuration to control refresh of facility list on startup
ojwanganto Jan 17, 2024
02c63e3
Merge pull request #1788 from makombe/updating-2.6-jan
makombe Jan 18, 2024
8ffc57d
Remove unused github cicd task
jecihjoy Jan 22, 2024
62cad1d
Merge branch 'openmrs-2.6.x-upgrade' into diff-changes
jecihjoy Jan 23, 2024
c27df73
Merge pull request #1793 from jecihjoy/diff-changes
jecihjoy Jan 23, 2024
48d8b6a
Merge pull request #1794 from jecihjoy/local-branch
jecihjoy Jan 23, 2024
f7dbc78
Using Clinical tca over refill date as preferred next appointment dat…
njorocs Feb 2, 2024
dd31426
Merge pull request #1798 from makombe/new-changes
makombe Feb 2, 2024
21c1cfc
Merge branch 'openmrs-2.6.x-upgrade' into update-2.6-branch
jecihjoy Feb 15, 2024
751fb76
Merge pull request #1806 from palladiumkenya/update-2.6-branch
jecihjoy Feb 15, 2024
5d7b929
Update maven_deploy_cicd.yml
jecihjoy Feb 15, 2024
9194e4a
(feat) Add `MAT Clinical encounter` encounter type to support MAT Pro…
donaldkibet Feb 14, 2024
bbaf572
Merge branch 'master' into update-2.6-x
makombe Feb 21, 2024
66f4751
Merge pull request #1817 from makombe/update-2.6-x
makombe Feb 21, 2024
cc10241
Remove non paying visit attribute type
makombe Feb 21, 2024
20bb128
Merge pull request #1819 from makombe/non-paying-attribute
jecihjoy Feb 21, 2024
4fbd647
Merge branch 'master' into update-latest
makombe Feb 22, 2024
5a7a02a
Merge pull request #1821 from makombe/update-latest
makombe Feb 22, 2024
fed0cba
Merge branch 'master' into new-updates
makombe Feb 27, 2024
d1abc23
Merge pull request #1825 from makombe/new-updates
makombe Feb 27, 2024
060bd32
Merge branch 'master' into new-update
makombe Mar 1, 2024
6bcb355
Merge pull request #1827 from makombe/new-update
makombe Mar 1, 2024
41d8e06
Merge branch 'master' into newUpdates
makombe Mar 1, 2024
4e8546d
Merge pull request #1829 from makombe/newUpdates
makombe Mar 1, 2024
80a0546
Fixed issue in date filtering
njorocs Mar 11, 2024
80dc3ed
Merge pull request #1832 from njorocs/idsr-date-filter-fix
jecihjoy Mar 12, 2024
6426220
Change appointment dependancy to bahmni
makombe Mar 12, 2024
79e1a2f
Merge branch 'master' into changes
makombe Mar 12, 2024
488407b
Merge pull request #1836 from makombe/changes
makombe Mar 12, 2024
cd25eb4
Merge pull request #1833 from makombe/appointment-dependancy
jecihjoy Mar 19, 2024
1289f5f
Add report metadata in the context and supply the template
ningosi Mar 21, 2024
34fc337
Add 717 report
ningosi Mar 21, 2024
6640cc8
Add report metadata in the context and supply the template
ningosi Mar 21, 2024
e74f485
Add 717 report
ningosi Mar 21, 2024
6ad5ee5
Merge branch '705a-dissag-fixes' of https://github.com/uonafya/openmr…
Injiri Mar 21, 2024
eade442
Add report metadata in the context and supply the template
Injiri Mar 21, 2024
84bcd7f
adapt endpoint for running and returning sql results
ojwanganto Jan 22, 2024
03a48fc
Add sql rest endpoint
ojwanganto Mar 13, 2024
cbaf8b0
Initial stubs at disaggregated MOH705A
patryllus Mar 14, 2024
5d9227e
Fix report diassgrations of 705A
ningosi Mar 15, 2024
ecbe421
add more cohortDsd rows as per moh705a template
Injiri Mar 16, 2024
03b4629
add more cohortDsd rows as per moh705a template
Injiri Mar 16, 2024
22368d9
add template, dsd diagnosis lists rows for 705b
agesa3 Mar 20, 2024
5f69e4a
add sql for getting list of patients for ward admission
ojwanganto Mar 15, 2024
caa10c7
redirect login and home requests to o3 pages
ojwanganto Mar 18, 2024
dcbc3f2
Fixing failing query due to date valiation in mysql 8
njorocs Mar 19, 2024
50c2c60
include 705b bean and set report dimension
Injiri Mar 20, 2024
8615f02
Merge branch 'master' into openmrs-2.6.x-upgrade
makombe Mar 21, 2024
34c8c6e
rebase
Injiri Mar 21, 2024
72166b3
Merge branch '705a-dissag-fixes' of https://github.com/uonafya/openmr…
Injiri Mar 21, 2024
9fd4acb
(OPS): Github workflow to allow auto-deployment to dev (#1845)
Murithijoshua Mar 22, 2024
3ae4a76
Removed misplace - from the clone (#1846)
Murithijoshua Mar 23, 2024
9020769
Updated mismatched blood in stool and unexplained bleeding concepts i…
patryllus Mar 26, 2024
63b355c
new mods
PatrickWaweru Mar 31, 2024
a69a2aa
new mods 2
PatrickWaweru Mar 31, 2024
a1356ca
new mods 3
PatrickWaweru Mar 31, 2024
cc3690c
Insert the licence file automatically on files that are missing such,…
ningosi Apr 2, 2024
a44411d
Cleaned up 705aA/B added missing variables - referrals, tested malari…
patryllus Apr 2, 2024
01aa8e7
Merge pull request #1851 from patryllus/moh705-report
njorocs Apr 3, 2024
ec9d7f5
Merge pull request #1847 from patryllus/dmi-mismatched-concepts
njorocs Apr 3, 2024
829b474
Correct failing class compartibility
ningosi Apr 3, 2024
9ba7046
Added CORS fix
PatrickWaweru Apr 5, 2024
4308a7a
Added MOH 204 A for under 5 and B for above 5 years
patryllus Apr 6, 2024
1b5984c
(feat) Add Social Health Insurance Number to meta data deploy
donaldkibet Apr 6, 2024
30f3c51
Merge pull request #1855 from palladiumkenya/feat/AddSHIN
ojwanganto Apr 6, 2024
1b9d209
Merge pull request #1854 from patryllus/moh204a-report
ojwanganto Apr 6, 2024
0f6e412
Bumping 18.8.0 (#1856)
patryllus Apr 9, 2024
9de61f1
Maintain the report name as from upstream
ningosi Apr 15, 2024
6d7f833
Merge branch 'master' into 705a-dissag-fixes
ningosi Apr 15, 2024
1dc991b
Merge pull request #1858 from uonafya/705a-dissag-fixes
makombe Apr 16, 2024
e69a5c3
Refactor, code optimization and 717 fixes
ningosi Apr 17, 2024
42a5db4
Display the EHR reports to the UI
ningosi Apr 17, 2024
510020c
Merge pull request #1861 from palladiumkenya/MOH717-fixes
makombe Apr 17, 2024
2c1e3e7
Initial work for the monthly revenue collection
ningosi Apr 16, 2024
de02d4d
Add 717 report
ningosi Mar 21, 2024
4617291
Add report metadata in the context and supply the template
ningosi Apr 16, 2024
0f0514c
Updated monthly revenue report - cleaned up and used a single template
patryllus Apr 17, 2024
2c837a1
Resolving conflicts
patryllus Apr 17, 2024
9365a72
Merge pull request #1863 from patryllus/monthly-revenue-report
makombe Apr 17, 2024
1d923be
Merge branch 'master' into MOH717-fixes
ningosi Apr 17, 2024
1c49a9d
Qualify the patient id in the query
ningosi Apr 17, 2024
ad29852
Merge pull request #1862 from palladiumkenya/MOH717-fixes
makombe Apr 17, 2024
2118a4f
Updated monthly revenue summaries to include totals per reporting perion
patryllus Apr 17, 2024
5512b54
Setup procedure results encounter type
jecihjoy Apr 17, 2024
7a7ecc1
Construct the report builders based on the available beans
ningosi Apr 18, 2024
99c0f39
Merge pull request #1866 from palladiumkenya/reports
makombe Apr 18, 2024
0f1e89b
Merge pull request #1865 from jecihjoy/procedures
patryllus Apr 18, 2024
bbd496b
Add 706 summarry tool and the respective 240 register
ningosi Apr 18, 2024
096364c
updated MOH240 and MOH706 to pull from kenyaemr_etl fields, cleaned 5…
patryllus Apr 18, 2024
9d86908
Removing duplicated EncounterDatetimeConverter class, cleaning up moh240
patryllus Apr 18, 2024
5ef2cb9
Merge pull request #1864 from patryllus/monthly-revenue-report
njorocs Apr 19, 2024
9a6193f
Merge pull request #1869 from patryllus/moh240_706
patryllus Apr 19, 2024
c6ae8ae
DMI: Updating cholera case definition from diarrhea to watery diarrhe…
patryllus Apr 19, 2024
1d7715b
Merge pull request #1870 from patryllus/dmi-cholera-case-definition
njorocs Apr 19, 2024
7b8ae54
Updated concept id for diarhea to waterly diarhea
njorocs Apr 19, 2024
7c71253
Merge pull request #1871 from njorocs/idsr-concept
patryllus Apr 19, 2024
2645971
add exemption list for forms in 3.x
ojwanganto Apr 19, 2024
9656671
Merge pull request #1872 from ojwanganto/feat/add_3x_forms_exemption_…
makombe Apr 19, 2024
b077070
Initial stub on FCDRR report and adding context parameters for the co…
ningosi Apr 19, 2024
9593c7c
Updated MOH204 report to pick all diagnosis reported rather than a su…
patryllus Apr 23, 2024
23cc18c
Updated MOH204 report to pick all diagnosis reported rather than a su…
patryllus Apr 24, 2024
65f8f3a
Merge pull request #1874 from patryllus/moh-204-updates
njorocs Apr 29, 2024
a4f65c7
Added latest risk score, risk category and evaluation date to Active …
patryllus Apr 30, 2024
a240ea4
Bumping orderentry in kenyaemr to 1.6.3 - non-hiv lab manifest
patryllus May 2, 2024
e3c25b3
Merge pull request #1876 from patryllus/order-entry-kenyaemr
PatrickWaweru May 2, 2024
c00c0b0
Bumping orderentry in kenyaemr to 1.6.3 - non-hiv lab manifest adding…
patryllus May 2, 2024
781685b
Merge pull request #1877 from patryllus/order-entry-kenyaemr
PatrickWaweru May 2, 2024
835fdea
Add a column on NUPI number on the ANC register enchancements
gabriel090 May 3, 2024
ed4fcec
(fix) remove dependencies on Bahmni appointment module - KHP3-5543
ojwanganto May 4, 2024
42732d2
Merge pull request #1882 from ojwanganto/KHP3-5543
makombe May 4, 2024
5568123
Merge pull request #1879 from gabriel090/KHP3-5495
patryllus May 6, 2024
0ae364e
Migrate appointments from Obs to Bahmni appointment module
makombe May 6, 2024
406e78f
Merge pull request #1890 from makombe/appointment-migration
ojwanganto May 6, 2024
1ba7233
Fix new vl order NPE
makombe May 9, 2024
5670a28
Merge pull request #1895 from makombe/vl-null-pointer
patryllus May 9, 2024
4fc9a1a
Updated MOH240 Lab register for additional columns on EHR Reports
patryllus May 30, 2024
7e737ca
Merge pull request #1913 from patryllus/feat/moh-240-lab-register
makombe May 31, 2024
88cfd54
Merge pull request #1853 from PatrickWaweru/KHP3-5332-NUPI-Endpoint-3.X
PatrickWaweru May 31, 2024
f8cdd5c
Added REST call to get latest Obs for patient
PatrickWaweru May 31, 2024
5af0b2a
Merge pull request #1915 from PatrickWaweru/KHP3-5719-CreateBackendCa…
njorocs Jun 3, 2024
9a852ce
Merge pull request #1875 from patryllus/risk-Score-Tx-Curr
PatrickWaweru Jun 4, 2024
b6153f9
Update cicd_process.yml
andrineM Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions .github/workflows/cicd_process.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: deploy to prod 8600
on:
push:
branches: [ master ]
branches: [ 2.x ]
jobs:

build:
name: Deploy
name: deploying to 2.x instance
if: github.ref == 'refs/heads/2.x'
runs-on: ubuntu-latest
steps:
- name: executing remote connection
Expand All @@ -23,7 +23,7 @@ jobs:
sudo chown -R cicd2:cicd2 openmrs-module-kenyaemr
git config --global --add safe.directory /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr
cd /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr
git clone https://github.com/palladiumkenya/openmrs-module-kenyaemr.git /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr
git clone -b 2.x https://github.com/palladiumkenya/openmrs-module-kenyaemr.git /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr
sudo chown -R cicd2:cicd2 /apps/github-workflows/kenyaemr-modules/openmrs-module-kenyaemr
git status
mvn license:format
Expand All @@ -35,3 +35,35 @@ jobs:
sudo chmod 755 /var/lib/OpenMRS/modules/*.omod
sudo systemctl stop tomcat
sudo systemctl start tomcat

dev_server_deployment:
name: deploying to 3.x dev instance
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: executing remote connection
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.CICD_HOST }}
username: ${{ secrets.CICD_USERNAME }}
key: ${{ secrets.CICD_SECRET }}
port: ${{ secrets.PORT }}
command_timeout: 200m
script: |
cd /apps/githubworkflows/kenyaemr-modules
sudo rm -rf openmrs-module-kenyaemr
sudo mkdir openmrs-module-kenyaemr
sudo chown -R cicd:cicd openmrs-module-kenyaemr
git config --global --add safe.directory /apps/githubworkflows/kenyaemr-modules/openmrs-module-kenyaemr
cd /apps/githubworkflows/kenyaemr-modules/openmrs-module-kenyaemr
git clone -b master https://github.com/palladiumkenya/openmrs-module-kenyaemr.git .
git status
mvn license:format
sudo mvn clean install -DskipTests
sudo rm -rf /var/lib/OpenMRS/modules/kenyaemr-*.omod
sudo cp -r /apps/githubworkflows/kenyaemr-modules/openmrs-module-kenyaemr/omod/target/kenyaemr-*.omod /var/lib/OpenMRS/modules/
sudo chown -R tomcat:tomcat /var/lib/OpenMRS/modules/
sudo chmod +r /var/lib/OpenMRS/modules/*.omod
sudo chmod 755 /var/lib/OpenMRS/modules/*.omod
sudo service tomcat9 restart

2 changes: 1 addition & 1 deletion .github/workflows/maven_deploy_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
# Manually triggered workflow using the "Run workflow" button
workflow_dispatch:
push:
branches: [ master ]
branches: [ master,openmrs-2.6.x-upgrade ]

jobs:
publish:
Expand Down
4 changes: 2 additions & 2 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<parent>
<groupId>org.openmrs.module</groupId>
<artifactId>kenyaemr</artifactId>
<version>18.7.2-SNAPSHOT</version>
<version>18.8.0</version>
</parent>

<artifactId>kenyaemr-api</artifactId>
<version>18.7.2-SNAPSHOT</version>
<version>18.8.0</version>
<packaging>jar</packaging>
<name>KenyaEMR Module API</name>
<description>API project for KenyaEMR Module</description>
Expand Down
1 change: 1 addition & 0 deletions api/src/main/distro/metadata/identifierTypes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@
<ref key="ALIEN_ID_NUMBER" uuid="1c7d0e5b-2068-4816-a643-8de83ab65fbf" />
<ref key="DRIVING_LICENSE" uuid="ca125004-e8af-445d-9436-a43684150f8b" />
<ref key="RECENCY_TESTING_ID" uuid="fd52829a-75d2-4732-8e43-4bff8e5b4f1a" />
<ref key="SOCIAL_HEALTH_INSURANCE_NUMBER" uuid="52c3c0c3-05b8-4b26-930e-2a6a54e14c90" />
</refs>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Obj
if (vlOrders.size() > 0) {
Integer latestVlOrder = Collections.max(vlOrders);
if (dueForVl.contains(ptId) && orderService.getOrder(latestVlOrder).isVoided()
&& (orderService.getOrder(latestVlOrder).getVoidReason().equalsIgnoreCase("Sample not taken")
&& orderService.getOrder(latestVlOrder).getVoidReason() != null && (orderService.getOrder(latestVlOrder).getVoidReason().equalsIgnoreCase("Sample not taken")
|| orderService.getOrder(latestVlOrder).getVoidReason().equalsIgnoreCase("Collect new sample")
|| orderService.getOrder(latestVlOrder).getVoidReason().equalsIgnoreCase("Sample rejected")
|| orderService.getOrder(latestVlOrder).getVoidReason().equalsIgnoreCase("No reagents"))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public String getFlagMessage() {
return "Suspected Cholera case";
}

Integer VOMITING = 122983;
Integer DIARRHEA = 142412;
Integer VOMITING = 122983;
Integer WATERY_DIARRHEA = 161887;
Integer SCREENING_QUESTION = 5219;

@Override
Expand All @@ -71,7 +71,7 @@ public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Obj
Encounter lastGreenCardEnc = EmrUtils.lastEncounter(patient, greenCardEncType, greenCardForm); //last greencard followup form
ConceptService cs = Context.getConceptService();
Concept vomitingResult = cs.getConcept(VOMITING);
Concept diarrheaResult = cs.getConcept(DIARRHEA);
Concept diarrheaResult = cs.getConcept(WATERY_DIARRHEA);
Concept screeningQuestion = cs.getConcept(SCREENING_QUESTION);
boolean patientVomitClinicalEncResult = lastClinicalEncounter != null ? EmrUtils.encounterThatPassCodedAnswer(lastClinicalEncounter, screeningQuestion, vomitingResult) : false;
boolean patientDiarrheaClinicalEncResult = lastClinicalEncounter != null ? EmrUtils.encounterThatPassCodedAnswer(lastClinicalEncounter, screeningQuestion, diarrheaResult) : false;
Expand Down Expand Up @@ -115,4 +115,4 @@ public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Obj

return ret;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class EligibleForDysenteryCalculation extends AbstractPatientCalculation
public String getFlagMessage() {
return "Suspected Dysentery case";
}
Integer BLOOD_IN_STOOL = 132494;
Integer BLOOD_IN_STOOL = 117671;
Integer DIARRHEA = 142412;
Integer SCREENING_QUESTION = 5219;

Expand Down Expand Up @@ -110,4 +110,4 @@ public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Obj
}
return ret;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public String getFlagMessage() {
return "Suspected Haemorrhagic Fever";
}
Integer FEVER = 140238;
Integer BLEEDING_TENDENCIES = 159339;
Integer BLEEDING_TENDENCIES = 162628;
Integer SCREENING_QUESTION = 5219;

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/**
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
* the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
*
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.module.kenyaemr.chore;

import org.openmrs.api.APIException;
import org.openmrs.api.context.Context;
import org.openmrs.module.kenyacore.chore.AbstractChore;
import org.springframework.stereotype.Component;

import java.io.PrintWriter;

@Component("kenyaemr.chore.migratePatientAllergiesFromObs")
public class MigratePatientAllergiesFromObs extends AbstractChore {
@Override
public void perform(PrintWriter printWriter) throws APIException {
String migrateAllergies = "insert into allergy (allergy_id, patient_id, severity_concept_id, coded_allergen, non_coded_allergen, allergen_type,\n" +
" comments, creator, date_created, changed_by, date_changed, voided, voided_by, date_voided,\n" +
" void_reason, uuid, form_namespace_and_path, encounter_id) \n" +
"select null,o1.person_id,cn4.concept_id, case when cn1.concept_id is not null then cn1.concept_id else cn2.concept_id end,\n" +
" case when cn1.concept_id is not null then cn1.name else cn2.name end,\n" +
" case when cn2.concept_id is not null then 'Medication' else 'other' end,null,o1.creator,o1.date_created,null,null,o1.voided,\n" +
" o1.voided_by,o1.date_voided,reaction.obs_id,o1.uuid,null,null\n" +
" from obs o1\n" +
" left join (select * from obs where concept_id = 160643) allergen1\n" +
" on (o1.obs_group_id = allergen1.obs_group_id)\n" +
" LEFT JOIN concept_name cn1\n" +
" ON ( cn1.concept_id = allergen1.value_coded )\n" +
" left join (select * from obs where concept_id = 1193) allergen2\n" +
" on (o1.obs_group_id = allergen2.obs_group_id)\n" +
" LEFT JOIN concept_name cn2\n" +
" ON ( cn2.concept_id = allergen2.value_coded )\n" +
" left join (select * from obs where concept_id = 159935) reaction\n" +
" on (o1.obs_group_id = reaction.obs_group_id)\n" +
" LEFT JOIN concept_name cn3\n" +
" ON ( cn3.concept_id = reaction.value_coded )\n" +
" left join (select * from obs where concept_id = 162760) severity\n" +
" on (o1.obs_group_id = severity.obs_group_id)\n" +
" LEFT JOIN concept_name cn4\n" +
" ON ( cn4.concept_id = severity.value_coded )\n" +
" where (allergen1.value_coded != 1066 or allergen2.value_coded != 1066)\n" +
" AND o1.obs_group_id IS NOT NULL AND o1.concept_id in (160643,159935,162760,1193) \n" +
" group by o1.person_id, o1.obs_group_id;";

String migrateAllergyReactions = "insert into allergy_reaction (allergy_reaction_id, allergy_id, reaction_concept_id, reaction_non_coded, uuid) \n" +
"select null,allergy_id, cn3.concept_id, cn3.name,reaction.uuid\n" +
" from obs o1\n" +
" left join (select * from obs where concept_id = 159935) reaction\n" +
" on (o1.obs_group_id = reaction.obs_group_id)\n" +
" LEFT JOIN concept_name cn3\n" +
" ON ( cn3.concept_id = reaction.value_coded )\n" +
" inner join allergy al on al.void_reason = reaction.obs_id\n" +
" where o1.obs_group_id IS NOT NULL AND o1.concept_id in (159935) \n" +
" group by o1.person_id, o1.obs_group_id;";

String removeJoinColumn = "update allergy set void_reason = null;";

Context.getAdministrationService().executeSQL(migrateAllergies, false);
Context.getAdministrationService().executeSQL(migrateAllergyReactions, false);
Context.getAdministrationService().executeSQL(removeJoinColumn, false);


printWriter.println("Completed migrating patients allergies");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
* the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
*
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.module.kenyaemr.chore;

import org.openmrs.api.APIException;
import org.openmrs.api.context.Context;
import org.openmrs.module.kenyacore.chore.AbstractChore;
import org.springframework.stereotype.Component;

import java.io.PrintWriter;

@Component("kenyaemr.chore.migratePatientConditionsFromObs")
public class MigratePatientConditionsFromObs extends AbstractChore {
@Override
public void perform(PrintWriter printWriter) throws APIException {
String migrateConditions = "insert into conditions (condition_id, additional_detail, previous_version, condition_coded, condition_non_coded,\n" +
" condition_coded_name, clinical_status, verification_status, onset_date, date_created, voided,\n" +
" date_voided, void_reason, uuid, creator, voided_by, changed_by, patient_id, end_date,\n" +
" date_changed, encounter_id, form_namespace_and_path) \n" +
"select null, null, null,cn1.concept_id,null,cn1.concept_id , 'INACTIVE', 'PROVISIONAL',t2.value_datetime, o1.obs_datetime,\n" +
" 0, null,null,o1.uuid,o1.creator,null,null,o1.person_id,null,null,null,null\n" +
" from obs o1\n" +
" left join (select * from obs where concept_id = 1284) t1\n" +
" on (o1.obs_group_id = t1.obs_group_id)\n" +
" LEFT JOIN concept_name cn1\n" +
" ON ( cn1.concept_id = t1.value_coded )\n" +
" left join (select * from obs where concept_id = 159948) t2\n" +
" on (o1.obs_group_id = t2.obs_group_id)\n" +
" left join (select * from obs where concept_id = 166937) t3\n" +
" on (o1.obs_group_id = t3.obs_group_id)\n" +
" LEFT JOIN concept_name cn3\n" +
" ON ( cn3.concept_id = t3.value_coded )\n" +
" where o1.obs_group_id is not null and o1.concept_id in (1284,159948,166937)\n" +
" and t1.concept_id is not null \n" +
" group by o1.person_id, o1.obs_group_id;";


Context.getAdministrationService().executeSQL(migrateConditions, false);


printWriter.println("Completed migrating conditions");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
@Component
public class CommonMetadata extends AbstractMetadataBundle {

public static final String GP_CLIENT_VERIFICATION_USE_EMR_PROXY = "kenyaemr.client.registry.use.emr.proxy";
public static final String GP_CLIENT_VERIFICATION_EMR_VERIFICATION_PROXY_URL = "kenyaemr.client.registry.emr.verification.proxy.url";
public static final String GP_CLIENT_VERIFICATION_GET_END_POINT = "kenyaemr.client.registry.get.api";
public static final String GP_CLIENT_VERIFICATION_POST_END_POINT = "kenyaemr.client.registry.post.api";
public static final String GP_CLIENT_VERIFICATION_API_TOKEN = "kenyaemr.client.registry.api.token";
Expand All @@ -62,8 +64,10 @@ public static final class _EncounterType {
public static final String HIV_SELF_TEST = "8b706d42-b4ae-4b3b-bd83-b14f15294362";
public static final String VMMC_PROCEDURE = "35c6fcc2-960b-11ec-b909-0242ac120002" ;
public static final String GAD_7 = "899d64ad-be13-4071-a879-2153847206b7";
public static final String MAT_CLINICAL_ENCOUNTER = "c3518485-ee22-4a47-b6d4-6d0e8f297b02";
public static final String ILI_SURVEILLANCE = "f60910c7-2edd-4d93-813c-0e57095f892f";
public static final String SARI_SURVEILLANCE = "76d55715-88cc-4851-b5e0-09136426fd46";
public static final String PROCEDURE_RESULTS = "99a7a6ba-59f4-484e-880d-01cbeaead62f";
}

public static final class _Form {
Expand Down Expand Up @@ -112,6 +116,7 @@ public static final class _PatientIdentifierType {
public static final String ALIEN_ID_NUMBER = Metadata.IdentifierType.ALIEN_ID_NUMBER;
public static final String DRIVING_LICENSE = Metadata.IdentifierType.DRIVING_LICENSE;
public static final String RECENCY_TESTING_ID = Metadata.IdentifierType.RECENCY_TESTING_ID;
public static final String SOCIAL_HEALTH_INSURANCE_NUMBER = Metadata.IdentifierType.SOCIAL_HEALTH_INSURANCE_NUMBER;
}

public static final class _PersonAttributeType {
Expand Down Expand Up @@ -188,8 +193,10 @@ public void install() {
install(encounterType("Cervical cancer screening", "Cervical cancer screening", _EncounterType.CACX_SCREENING));
install(encounterType("HIV self testing", "Self testing screening", _EncounterType.HIV_SELF_TEST));
install(encounterType("Oncology screening", "Oncology screening encounter type", _EncounterType.ONCOLOGY_SCREENING));
install(encounterType("MAT Clinical Encounter", "MAT Clinical Encounter", _EncounterType.MAT_CLINICAL_ENCOUNTER));
install(encounterType("ILI Surveillance", "ILI Surveillance encounter type", _EncounterType.ILI_SURVEILLANCE));
install(encounterType("SARI Surveillance", "SARI Surveillance encounter type", _EncounterType.SARI_SURVEILLANCE));
install(encounterType("Procedure Results", "Procedure outcome encounter type", _EncounterType.PROCEDURE_RESULTS));

install(form("Clinical Encounter", null, _EncounterType.CONSULTATION, "1", _Form.CLINICAL_ENCOUNTER));
install(form("Lab Results", null, _EncounterType.LAB_RESULTS, "1", _Form.LAB_RESULTS));
Expand Down Expand Up @@ -228,6 +235,12 @@ public void install() {
install(globalProperty("client_number_label", "Label for Client Number", "Client Number"));
install(globalProperty("clientNumber.enabled", "Switch to show client number", "false"));

if(Context.getAdministrationService().getGlobalPropertyObject(CommonMetadata.GP_CLIENT_VERIFICATION_USE_EMR_PROXY) == null) {
install(globalProperty(GP_CLIENT_VERIFICATION_USE_EMR_PROXY, "Use the EMR backend to proxy NUPI requests (true or false)", "false"));
}
if(Context.getAdministrationService().getGlobalPropertyObject(CommonMetadata.GP_CLIENT_VERIFICATION_EMR_VERIFICATION_PROXY_URL) == null) {
install(globalProperty(GP_CLIENT_VERIFICATION_EMR_VERIFICATION_PROXY_URL, "The local EMR URL to proxy NUPI verification requests", "http://127.0.0.1:8080/openmrs/ws/rest/v1/kenyaemr/verifynupi"));
}
if(Context.getAdministrationService().getGlobalPropertyObject(CommonMetadata.GP_CLIENT_VERIFICATION_GET_END_POINT) == null) {
install(globalProperty(GP_CLIENT_VERIFICATION_GET_END_POINT, "A GET API for getting client information at the client registry", "https://afyakenyaapi.health.go.ke/partners/registry/search"));
}
Expand Down Expand Up @@ -294,6 +307,8 @@ public void install() {
null, LocationBehavior.NOT_USED, false, _PatientIdentifierType.DRIVING_LICENSE));
install(patientIdentifierType("Recency Testing ID", "Recency Testing ID", "", "Allows for alphanumeric format",
null, LocationBehavior.NOT_USED, false, _PatientIdentifierType.RECENCY_TESTING_ID));
install(patientIdentifierType("Social Health Insurance Number", "Social Health Insurance Number", "", "Allows for alphanumeric format",
null, LocationBehavior.NOT_USED, false, _PatientIdentifierType.SOCIAL_HEALTH_INSURANCE_NUMBER));


install(personAttributeType("Telephone contact", "Telephone contact number",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.module.kenyaemr.reporting.Moh705ReportUtils;
package org.openmrs.module.kenyaemr.reporting.MohReportUtils;

public class AutismDiagnosisConstants {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.module.kenyaemr.reporting.Moh705ReportUtils;
package org.openmrs.module.kenyaemr.reporting.MohReportUtils;

/**
* Describes a column in a CohortIndicatorDataSetDefinition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.module.kenyaemr.reporting.Moh705ReportUtils;
package org.openmrs.module.kenyaemr.reporting.MohReportUtils;

public class ConvulsiveDiagnosisConstants {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.module.kenyaemr.reporting.Moh705ReportUtils;
package org.openmrs.module.kenyaemr.reporting.MohReportUtils;

public class DiabetesDiagnosisConstants {

Expand Down
Loading