Skip to content

Commit

Permalink
accidentally removed decision rule file
Browse files Browse the repository at this point in the history
  • Loading branch information
ashaban committed Mar 16, 2023
1 parent c103ecd commit 8137ca7
Show file tree
Hide file tree
Showing 2 changed files with 212 additions and 0 deletions.
142 changes: 142 additions & 0 deletions resources/Relationships/PatientRelationship.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"resourceType": "Basic",
"id": "patientreport",
"meta": {
"versionId": "1",
"lastUpdated": "2019-07-30T07:34:24.098+00:00",
"profile": [
"http://ihris.org/fhir/StructureDefinition/iHRISRelationship"
]
},
"extension": [
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportDetails",
"extension": [
{
"url": "label",
"valueString": "Patient Report"
},
{
"url": "name",
"valueString": "patients"
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "gender"
},
{
"url": "name",
"valueString": "gender"
}
]
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "birthDate"
},
{
"url": "name",
"valueString": "birthDate"
}
]
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "given"
},
{
"url": "name",
"valueString": "name.where(use='official').last().given"
}
]
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "family"
},
{
"url": "name",
"valueString": "name.where(use='official').last().family"
}
]
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "fullname"
},
{
"url": "name",
"valueString": "name.where(use='official').last().text"
}
]
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "phone"
},
{
"url": "name",
"valueString": "telecom.where(system='phone').value"
}
]
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "nationalid"
},
{
"url": "name",
"valueString": "identifier.where(system='http://clientregistry.org/nationalid').last().value"
}
]
},
{
"url": "http://ihris.org/fhir/StructureDefinition/iHRISReportElement",
"extension": [
{
"url": "label",
"valueString": "art"
},
{
"url": "name",
"valueString": "identifier.where(system='http://clientregistry.org/artnumber').value"
}
]
}
]
}
],
"code": {
"coding": [
{
"system": "http://ihris.org/fhir/ValueSet/ihris-resource",
"code": "iHRISRelationship"
}
],
"text": "iHRISRelationship"
},
"subject": {
"reference": "StructureDefinition/Patient"
}
}
70 changes: 70 additions & 0 deletions server/config/decisionRules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"__comments": {
"path": "Its a fhir path, for syntax refer to https://www.hl7.org/fhir/fhirpath.html",
"matchingType": "Must be specified, it can either",
"threshold": {
"levenshtein": "Lower the number, the closer the match, 0 being exact match, max threshold is 2",
"jaro-winkler": "number between 0 and 1, where 0 for no match and 1 for exact match"
},
"supported_algorithms": {
"elasticsearch": ["https://github.com/intrahealth/similarity-scoring"]
}
},
"rules": [{
"matchingType": "deterministic",
"fields": {
"given": {
"algorithm": "jaro-winkler-similarity",
"threshold": 0.8,
"fhirpath": "name.where(use='official').given",
"null_handling": "moderate",
"null_handling_both": "moderate",
"espath": "given"
},
"family": {
"algorithm": "jaro-winkler-similarity",
"threshold": 0.9,
"fhirpath": "name.where(use='official').family",
"null_handling": "moderate",
"null_handling_both": "moderate",
"espath": "family"
},
"birthdate": {
"algorithm": "exact",
"fhirpath": "birthDate",
"null_handling": "moderate",
"null_handling_both": "moderate",
"espath": "birthDate"
},
"phone": {
"algorithm": "exact",
"fhirpath": "telecom.where(system='phone').value",
"null_handling": "moderate",
"null_handling_both": "moderate",
"espath": "phone"
},
"nationalid": {
"algorithm": "exact",
"fhirpath": "identifier.where(system='http://clientregistry.org/nationalid').value",
"null_handling": "moderate",
"null_handling_both": "moderate",
"espath": "nationalid"
},
"art": {
"algorithm": "exact",
"fhirpath": "identifier.where(system='http://clientregistry.org/artnumber').value",
"null_handling": "moderate",
"null_handling_both": "moderate",
"espath": "art"
}
},
"potentialMatchThreshold": 4,
"autoMatchThreshold": 6,
"filters": {
"gender": {
"fhirpath": "gender",
"espath": "gender"
}
}
}]
}

0 comments on commit 8137ca7

Please sign in to comment.