Skip to content

Commit

Permalink
Updated MDM rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Aziz Essid authored and Aziz Essid committed Sep 21, 2022
1 parent 7d3c2cb commit 53077c0
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ RUN curl -LSsO https://github.com/open-telemetry/opentelemetry-java-instrumentat

COPY pom.xml .
COPY server.xml .

COPY settings.xml /root/.m2/settings.xml

RUN mvn -ntp dependency:go-offline
Expand All @@ -17,6 +16,7 @@ RUN mvn clean install -DskipTests -Djdk.lang.Process.launchMechanism=vfork
FROM build-hapi AS build-distroless
RUN mvn package spring-boot:repackage -Pboot
RUN mkdir /app && cp /tmp/hapi-fhir-jpaserver-starter/target/ROOT.war /app/TestMain.war
RUN cp /tmp/hapi-fhir-jpaserver-starter/target/ROOT-classes.jar /app/ROOT-classes.jar

########### bitnami tomcat version is suitable for debugging and comes with a shell
########### it can be built using eg. `docker build --target tomcat .`
Expand Down Expand Up @@ -49,4 +49,4 @@ COPY --chown=nonroot:nonroot --from=build-distroless /app /app
COPY --chown=nonroot:nonroot --from=build-hapi /tmp/hapi-fhir-jpaserver-starter/opentelemetry-javaagent.jar /app

ENTRYPOINT ["java"]
CMD ["-jar" ,"/app/TestMain.war"]
CMD ["-jar" ,"/app/TestMain.war"]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3"
services:
hapi-fhir-jpaserver-start:
image: rofim/hapi:arm
build: .
container_name: hapi-fhir-jpaserver-start
restart: on-failure
ports:
Expand Down
1 change: 1 addition & 0 deletions server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
connectionTimeout="20000"
redirectPort="8443"
maxThreads="${server.tomcat.max-threads}"
relaxedQueryChars="[]|{}^\`"<>"
minSpareThreads="${server.tomcat.min-spare-threads}" />

<!-- You should set jvmRoute to support load-balancing via AJP ie :
Expand Down
2 changes: 1 addition & 1 deletion settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<server>
<id>github</id>
<username>azizessidrofim</username>
<password>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</password>
<password>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</password>
</server>
</servers>
</settings>
Expand Down
1 change: 0 additions & 1 deletion src/main/java/ca/uhn/fhir/jpa/starter/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public ServletRegistrationBean hapiServletRegistration(JpaRestfulServer jpaRestf
servletRegistrationBean.setLoadOnStartup(1);
return servletRegistrationBean;
}

@Bean
public ServletRegistrationBean overlayRegistrationBean() {
AnnotationConfigWebApplicationContext annotationConfigWebApplicationContext = new AnnotationConfigWebApplicationContext();
Expand Down
115 changes: 93 additions & 22 deletions src/main/resources/mdm-rules.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,119 @@
{
"version": "1",
"mdmTypes": ["Patient", "Practitioner"],
"mdmTypes" : ["Organization", "Patient", "Practitioner"],
"candidateSearchParams": [
{
"resourceType": "Patient",
"searchParams": ["birthdate"]
"searchParams": [
"phone"
]
},
{
"resourceType": "*",
"searchParams": ["identifier"]
"resourceType": "Patient",
"searchParams": [
"birthdate"
]
},
{
"resourceType": "Patient",
"searchParams": ["general-practitioner"]
}
],
"candidateFilterSearchParams": [
"searchParams": [
"identifier"
]
},
{
"resourceType": "Patient",
"searchParams": [
"given"
]
},
{
"resourceType": "*",
"searchParam": "active",
"fixedValue": "true"
"resourceType": "Patient",
"searchParams": [
"family"
]
}
],
"candidateFilterSearchParams": [],
"matchFields": [
{
"name": "cosine-given-name",
"resourceType": "*",
"resourcePath": "name.given",
"name": "birthday",
"resourceType": "Patient",
"resourcePath": "birthDate",
"matcher": {
"algorithm": "STRING"
}
},
{
"name": "phone",
"resourceType": "Patient",
"resourcePath": "telecom.value",
"matcher": {
"algorithm": "STRING"
}
},
{
"name": "firstname-meta",
"resourceType": "Patient",
"fhirPath": "name.given.first()",
"matcher": {
"algorithm": "COLOGNE"
"algorithm": "METAPHONE"
}
},
{
"name": "jaro-last-name",
"resourceType": "*",
"name": "lastname-meta",
"resourceType": "Patient",
"resourcePath": "name.family",
"matcher": {
"algorithm": "METAPHONE"
}
},
{
"name": "firstname-jaro",
"resourceType": "Patient",
"resourcePath": "name.given",
"similarity": {
"algorithm": "JARO_WINKLER",
"matchThreshold": 0.80
}
},
{
"name": "lastname-jaro",
"resourceType": "Patient",
"resourcePath": "name.family",
"similarity": {
"algorithm": "JARO_WINKLER",
"matchThreshold": 0.80
}
},
{
"name": "org-name",
"resourceType": "Organization",
"resourcePath": "name",
"matcher": {
"algorithm": "STRING"
}
},
{
"name": "identifier",
"resourceType": "Patient",
"resourcePath": "identifier",
"matcher": {
"algorithm": "SOUNDEX"
"algorithm": "IDENTIFIER"
}
}
],
"matchResultMap": {
"cosine-given-name" : "POSSIBLE_MATCH",
"cosine-given-name,jaro-last-name" : "MATCH"
"identifier": "MATCH",
"firstname-meta,lastname-meta,birthday": "MATCH",
"firstname-meta,lastname-meta,phone": "MATCH",
"firstname-jaro,lastname-jaro,birthday": "POSSIBLE_MATCH",
"firstname-jaro,lastname-jaro,phone": "POSSIBLE_MATCH",
"lastname-jaro,phone,birthday": "POSSIBLE_MATCH",
"firstname-jaro,phone,birthday": "POSSIBLE_MATCH",
"org-name": "MATCH"
},
"eidSystem": "http:https://company.io/fhir/NamingSystem/custom-eid-system"
}
"eidSystems": {
"Organization": "https://hapifhir.org/identifier/naming/business-number",
"Practitioner": "https://hapifhir.org/identifier/naming/license-number"
}
}

0 comments on commit 53077c0

Please sign in to comment.