Skip to content

Commit

Permalink
Poc 367 (#1291)
Browse files Browse the repository at this point in the history
* POC-399

* POC-367
  • Loading branch information
drizzentic authored Jul 12, 2023
1 parent 12e8afb commit a4f3a04
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '2'
services:
etl-prod:
container_name: etl-rest-server-prod
image: ampathke/etl-services:v2.16.5.2
image: ampathke/etl-services:<tag>
environment:
- NODE_TLS_REJECT_UNAUTHORIZED=0
- TZ=Africa/Nairobi
Expand All @@ -11,13 +11,13 @@ services:
- 8.8.8.8

volumes:
- /media/data/etl/conf:/opt/etl/conf
- /media/data/etl/uploads:/opt/etl/uploads
- <source_directory>:/opt/etl/conf
- <source_directory>:/opt/etl/uploads
# deploy:
# mode: replicated
# replicas: 1
# placement:
# constraints:
# - node.hostname == upgrade1
ports:
- 9141:8002
- <server_port>:8002
6 changes: 3 additions & 3 deletions programs/patient-program-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5372,7 +5372,7 @@
{
"uuid": "02e3ce61-fa24-445e-a1f0-6e3299142966",
"name": "ANC Return Visit",
"allowedIf": "programLocation === intendedVisitLocationUuid && !isFirstANCVisit && gender==='F'",
"allowedIf": "programLocation === intendedVisitLocationUuid && (!isFirstAMPATHHIVVisit || !isFirstANCVisit) && gender==='F'",
"encounterTypes": [
{
"uuid": "26bfc6b7-28d0-41ab-90c5-e101af46d06d",
Expand Down Expand Up @@ -5446,10 +5446,10 @@
{
"uuid": "0b1b6194-d2d5-4e4b-9f7c-c3b778ccc354",
"name": "PMTCT Postnatal Return Visit",
"allowedIf": "programLocation === intendedVisitLocationUuid && !isFirstPNCVisit && gender==='F'",
"allowedIf": "programLocation === intendedVisitLocationUuid && (!isFirstAMPATHHIVVisit || !isFirstPNCVisit) && gender==='F'",
"encounterTypes": [
{
"uuid": "ded4ecf7-8129-4a9e-8aa3-a21a7adb7759",
"uuid": "db215741-de99-424a-a109-1f23eb3b680b",
"display": "PNC ADULTRETURN"
},
{
Expand Down
7 changes: 5 additions & 2 deletions programs/scope-builder.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ function isInitialVisit(
let initialEncounters = _.filter(patientEncounters, (encounter) => {
return encounterUuid === encounter.encounterType.uuid;
});

const activeEnrollments = _.filter(patientEnrollment, {
dateCompleted: null
});
Expand Down Expand Up @@ -397,13 +398,15 @@ function buildMNCHScopeMembers(scope, patientEncounters, programEnrollment) {
patientEncounters,
programEnrollment,
'52aeb285-fb18-455b-893e-3e53ccc77ceb',
'f5702679-6a16-43bd-8629-4b44c7a78ff1'
'f5702679-6a16-43bd-8629-4b44c7a78ff1',
'8d5b27bc-c2cc-11de-8d13-0010c6dffd0f'
);
scope.isFirstPNCVisit = isInitialVisit(
patientEncounters,
programEnrollment,
'd2552058-d7bd-47c6-aed1-480a4308027a',
'ded4ecf7-8129-4a9e-8aa3-a21a7adb7759'
'ded4ecf7-8129-4a9e-8aa3-a21a7adb7759',
'8d5b27bc-c2cc-11de-8d13-0010c6dffd0f'
);
}
function isInitialHivVisit(patientEncounters) {
Expand Down

0 comments on commit a4f3a04

Please sign in to comment.