From d001032c4ea4c508dcbd02849bfaa390326dd281 Mon Sep 17 00:00:00 2001 From: Atiquzzaman Date: Mon, 2 Jan 2023 18:59:15 +0600 Subject: [PATCH 1/4] Changes docker and local build --- Dockerfile | 15 +++++---------- env/local.properties | 10 +++++----- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 00304102..f8b2f3f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,10 @@ -FROM centos:6.6 +FROM centos -ENV JAVA_VERSION_MAJOR=8 \ - JAVA_VERSION_MINOR=171 \ - JAVA_VERSION_BUILD=11 \ - JAVA_URL_HASH=512cd62ec5174c3487ac17c61aaa89e8 +RUN cd /etc/yum.repos.d/ +RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* +RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* -RUN yum install -y wget && \ - wget -q --no-cookies --no-check-certificate \ - --header 'Cookie:oraclelicense=accept-securebackup-cookie' \ - "http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/${JAVA_URL_HASH}/jre-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.rpm" && \ - yum install -y jre-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.rpm && rm -f jre-*.rpm && yum clean all +RUN yum install java-1.8.0-openjdk -y COPY mci-api/build/distributions/mci-*.noarch.rpm /tmp/mci.rpm RUN yum install -y /tmp/mci.rpm && rm -f /tmp/mci.rpm && yum clean all diff --git a/env/local.properties b/env/local.properties index 34fe78b7..bace95a3 100644 --- a/env/local.properties +++ b/env/local.properties @@ -11,9 +11,9 @@ REST_POOL_SIZE=20 MCI_PORT=8081 API_VERSION=v1 IS_LATEST_API_VERSION=true -FR_URL=http://hrmtest.dghs.gov.bd/api/1.0/facilities -PR_URL=http://hrmtest.dghs.gov.bd/api/1.0/providers -IDENTITY_SERVER_BASE_URL=http://172.18.46.55:8084/ +FR_URL=http://localhost:8084/api/1.0/facilities +PR_URL=http://localhost:8084/api/1.0/providers +IDENTITY_SERVER_BASE_URL=http://localhost:8084/ IDENTITY_SERVER_SIGNIN_PATH=signin IDENTITY_SERVER_USER_INFO_PATH=token FR_CACHE_TTL=86400 @@ -24,10 +24,10 @@ IDP_CLIENT_PASSWORD=thoughtworks IDP_AUTH_TOKEN=b43d2b284fa678fb8248b7cc3ab391f9c21e5d7f8e88f815a9ef4346e426bd33 WORKER_ID=1 MCI_LOG_LEVEL=INFO -SERVER_URL=http://192.168.33.19:8081 +SERVER_URL=http://localhost:8081 DUPLICATE_PATIENT_FEED_DELAY=10000 DUPLICATE_PATIENT_FEED_INITIAL_DELAY=10000 -HID_SERVICE_BASE_URL=http://localhost:9082 +HID_SERVICE_BASE_URL=http://localhost:8086 HID_SERVICE_NEXT_BLOCK_URL=/healthIds/nextBlock/mci/%s?blockSize=%s HID_SERVICE_CHECK_HID_URL=/healthIds/checkAvailability/%s?orgCode=%s HEALTH_ID_REPLENISH_DELAY=60000 From 32efad309a7436a01194080a23c6b0588eed75fe Mon Sep 17 00:00:00 2001 From: Atiquzzaman Date: Wed, 22 Feb 2023 07:52:10 +0600 Subject: [PATCH 2/4] Enabled search mapping scheduler --- env/docker_mci | 2 +- env/local.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/env/docker_mci b/env/docker_mci index 8d1d29a8..d9c85f7a 100644 --- a/env/docker_mci +++ b/env/docker_mci @@ -41,4 +41,4 @@ export SEARCH_MAPPING_TASK_BLOCK_SIZE=10 export MAX_FAILED_EVENTS=5 export FAILED_EVENT_RETRY_LIMIT=5 export MCI_ORG_CODE=10019862 -export IS_MCI_MASTER_NODE=false +export IS_MCI_MASTER_NODE=true diff --git a/env/local.properties b/env/local.properties index bace95a3..94adeaa6 100644 --- a/env/local.properties +++ b/env/local.properties @@ -41,4 +41,4 @@ SEARCH_MAPPING_TASK_BLOCK_SIZE=10 MAX_FAILED_EVENTS=5 FAILED_EVENT_RETRY_LIMIT=5 MCI_ORG_CODE=10019862 -IS_MCI_MASTER_NODE=false +IS_MCI_MASTER_NODE=true From 71e5496ca27b612206dc393b532235d43b995251 Mon Sep 17 00:00:00 2001 From: Samim Hossain Date: Wed, 1 Mar 2023 13:59:16 +0600 Subject: [PATCH 3/4] Updated NID validation to allow 10 digits --- .../java/org/sharedhealth/mci/domain/model/PatientData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mci-domain/src/main/java/org/sharedhealth/mci/domain/model/PatientData.java b/mci-domain/src/main/java/org/sharedhealth/mci/domain/model/PatientData.java index 85c71671..f6b686f3 100644 --- a/mci-domain/src/main/java/org/sharedhealth/mci/domain/model/PatientData.java +++ b/mci-domain/src/main/java/org/sharedhealth/mci/domain/model/PatientData.java @@ -52,7 +52,7 @@ public class PatientData implements Diffable { @JsonProperty(NID) @JsonInclude(NON_EMPTY) - @Pattern(regexp = "^|[\\d]{13}|[\\d]{17}", message = ERROR_CODE_PATTERN) + @Pattern(regexp = "^|[\\d]{10}", message = ERROR_CODE_PATTERN) private String nationalId; @JsonProperty(BIN_BRN) From 429c24d537e1e1dbe022f763a0c26a20c4e15947 Mon Sep 17 00:00:00 2001 From: Samim Hossain Date: Wed, 1 Mar 2023 16:10:41 +0600 Subject: [PATCH 4/4] Updated NID validation to allow 10 digits where 13 and 17 digits were allowed --- .../java/org/sharedhealth/mci/domain/model/PatientData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mci-domain/src/main/java/org/sharedhealth/mci/domain/model/PatientData.java b/mci-domain/src/main/java/org/sharedhealth/mci/domain/model/PatientData.java index f6b686f3..03d7a302 100644 --- a/mci-domain/src/main/java/org/sharedhealth/mci/domain/model/PatientData.java +++ b/mci-domain/src/main/java/org/sharedhealth/mci/domain/model/PatientData.java @@ -52,7 +52,7 @@ public class PatientData implements Diffable { @JsonProperty(NID) @JsonInclude(NON_EMPTY) - @Pattern(regexp = "^|[\\d]{10}", message = ERROR_CODE_PATTERN) + @Pattern(regexp = "^|[\\d]{13}|[\\d]{17}|[\\d]{10}", message = ERROR_CODE_PATTERN) private String nationalId; @JsonProperty(BIN_BRN)