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

Presets and pre-loaded ValidationEngines #184

Merged
merged 26 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8864d86
WIP pre-load base validation engines 1
dotasek Jan 26, 2024
bc7e4af
WIP preset selection 2
dotasek Jan 26, 2024
d572834
Start test cases
dotasek Jan 31, 2024
59b3016
Allow language setting for baseEngine use
dotasek Jan 31, 2024
60561fe
Bump core
dotasek Jan 31, 2024
65dc57f
Merge from master
dotasek Feb 1, 2024
c937d6e
Update samples for direct testing against
dotasek Feb 1, 2024
2af5989
More test cases
dotasek Mar 6, 2024
2186951
Merge branch 'master' into do-20240126-baseengine
dotasek May 8, 2024
8293374
Merge branch 'master' into do-20240126-baseengine
dotasek May 8, 2024
5c1eddc
Engines + config enhancements
dotasek May 29, 2024
64217d0
Wow. Don't overwrite the preset contents when selecting a preset.
dotasek May 30, 2024
f22c262
WIP use guava to manage cache size
dotasek Jun 25, 2024
b80a12a
WIP use guava to manage cache size 2
dotasek Jun 25, 2024
86a2237
WIP Fix explicit query tests
dotasek Jun 28, 2024
88eb322
Configure Guava cache size at instantiation + tests
dotasek Jul 2, 2024
47091c6
Restore old duration setting for cache + explicitly indicate adapter
dotasek Jul 2, 2024
e05f756
Fix test
dotasek Jul 2, 2024
49777b7
Add test cases for presets + fix incorrect presets + fix preset profiles
dotasek Jul 3, 2024
735ca7d
More tests for to verify session cache behaviour + cleanup unused code
dotasek Jul 3, 2024
a86e544
Update for API changes
dotasek Jul 4, 2024
7d250d8
Update tests, move reload threshold to env variable, fix locale
dotasek Jul 16, 2024
81073b6
Merge branch 'master' into do-20240126-baseengine
dotasek Jul 16, 2024
027dd1e
Bump core version, adjust issue counts for smoke tests
dotasek Aug 12, 2024
2e680c1
Prep for release
dotasek Aug 13, 2024
65c78cd
Clean up
dotasek Aug 13, 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
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Large rework of preset system to include pre-cached validation engines
* Expand version endpoint to include core version
* Updated core version including fixes related to locale terminology validation
5 changes: 1 addition & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kotlin.code.style=official
kotlin.js.generate.executable.default=false

# versions
fhirCoreVersion=6.3.10
fhirCoreVersion= 6.3.20

junitVersion=5.7.1
mockk_version=1.10.2
Expand Down Expand Up @@ -39,6 +39,3 @@ koinVersion=3.2.1
logbackVersion=1.5.3
kmongoVersion=4.5.0




8 changes: 8 additions & 0 deletions http-client-tests/http-client.env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"default": {
"host": "https://validator.fhir.org"
},
"local": {
"host": "http://localhost:8082"
}
}
16 changes: 16 additions & 0 deletions http-client-tests/resources/explicit-preset-requests/cda.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions http-client-tests/resources/explicit-preset-requests/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cliContext": {
"sv": "4.0.1",
"locale": "en"
},
"filesToValidate": [
{
"fileName": "manually_entered_file.json",
"fileContent": "{\n \"resourceType\": \"Observation\",\n \"id\": \"blood-pressure\",\n \"meta\": {\n \"profile\": [\n \"http://hl7.org/fhir/StructureDefinition/vitalsigns\"\n ]\n },\n \"text\": {\n \"status\": \"generated\",\n \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: blood-pressure</p><p><b>meta</b>: </p><p><b>identifier</b>: urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281</p><p><b>basedOn</b>: </p><p><b>status</b>: final</p><p><b>category</b>: Vital Signs <span>(Details : {http://terminology.hl7.org/CodeSystem/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})</span></p><p><b>code</b>: Blood pressure systolic &amp; diastolic <span>(Details : {LOINC code '85354-9' = 'Blood pressure panel with all children optional', given as 'Blood pressure panel with all children optional'})</span></p><p><b>subject</b>: <a>Patient/example</a></p><p><b>effective</b>: 17/09/2012</p><p><b>performer</b>: <a>Practitioner/example</a></p><p><b>interpretation</b>: Below low normal <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'L' = 'Low', given as 'low'})</span></p><p><b>bodySite</b>: Right arm <span>(Details : {SNOMED CT code '368209003' = 'Right upper arm', given as 'Right arm'})</span></p><blockquote><p><b>component</b></p><p><b>code</b>: Systolic blood pressure <span>(Details : {LOINC code '8480-6' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {SNOMED CT code '271649006' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {http://acme.org/devices/clinical-codes code 'bp-s' = 'bp-s', given as 'Systolic Blood pressure'})</span></p><p><b>value</b>: 107 mmHg<span> (Details: UCUM code mm[Hg] = 'mmHg')</span></p><p><b>interpretation</b>: Normal <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'N' = 'Normal', given as 'normal'})</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Diastolic blood pressure <span>(Details : {LOINC code '8462-4' = 'Diastolic blood pressure', given as 'Diastolic blood pressure'})</span></p><p><b>value</b>: 60 mmHg<span> (Details: UCUM code mm[Hg] = 'mmHg')</span></p><p><b>interpretation</b>: Below low normal <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'L' = 'Low', given as 'low'})</span></p></blockquote></div>\"\n },\n \"identifier\": [\n {\n \"system\": \"urn:ietf:rfc:3986\",\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\n }\n ],\n \"basedOn\": [\n {\n \"identifier\": {\n \"system\": \"https://acme.org/identifiers\",\n \"value\": \"1234\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"vital-signs\",\n \"display\": \"Vital Signs\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"85354-9\",\n \"display\": \"Blood pressure panel with all children optional\"\n }\n ],\n \"text\": \"Blood pressure systolic & diastolic\"\n },\n \"subject\": {\n \"reference\": \"Patient/example\"\n },\n \"effectiveDateTime\": \"2012-09-17\",\n \"performer\": [\n {\n \"reference\": \"Practitioner/example\"\n }\n ],\n \"interpretation\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\n \"code\": \"L\",\n \"display\": \"low\"\n }\n ],\n \"text\": \"Below low normal\"\n }\n ],\n \"bodySite\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"368209003\",\n \"display\": \"Right arm\"\n }\n ]\n },\n \"component\": [\n {\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"8480-6\",\n \"display\": \"Systolic blood pressure\"\n },\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"271649006\",\n \"display\": \"Systolic blood pressure\"\n }\n ]\n },\n \"valueQuantity\": {\n \"value\": 107,\n \"unit\": \"mmHg\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"mm[Hg]\"\n },\n \"interpretation\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\n \"code\": \"N\",\n \"display\": \"normal\"\n }\n ],\n \"text\": \"Normal\"\n }\n ]\n },\n {\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"8462-4\",\n \"display\": \"Diastolic blood pressure\"\n }\n ]\n },\n \"valueQuantity\": {\n \"value\": 60,\n \"unit\": \"mmHg\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"mm[Hg]\"\n },\n \"interpretation\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\n \"code\": \"L\",\n \"display\": \"low\"\n }\n ],\n \"text\": \"Below low normal\"\n }\n ]\n }\n ]\n}",
"fileType": null
}
]
}
29 changes: 29 additions & 0 deletions http-client-tests/resources/explicit-preset-requests/ips-au.json

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions http-client-tests/resources/explicit-preset-requests/ips-nz.json

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions http-client-tests/resources/explicit-preset-requests/ips.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"cliContext": {
"sv": "5.0.0",
"igs": [
"hl7.fhir.uv.sql-on-fhir#current"
],
"locale": "en"
},
"filesToValidate": [
{
"fileName": "manually_entered_file.json",
"fileContent": "{\n \"resourceType\": \"http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition\",\n \"select\": [\n {\n \"column\": [\n {\n \"path\": \"getResourceKey()\",\n \"name\": \"patient_id\"\n }\n ]\n },\n {\n \"column\": [\n {\n \"path\": \"line.join('\\n')\",\n \"name\": \"street\",\n \"description\": \"The full street address, including newlines if present.\"\n },\n {\n \"path\": \"use\",\n \"name\": \"use\"\n },\n {\n \"path\": \"city\",\n \"name\": \"city\"\n },\n {\n \"path\": \"postalCode\",\n \"name\": \"zip\"\n }\n ],\n \"forEach\": \"address\"\n }\n ],\n \"name\": \"patient_addresses\",\n \"status\": \"draft\",\n \"resource\": \"Patient\"\n }",
"fileType": null
}
]
}
16 changes: 16 additions & 0 deletions http-client-tests/resources/explicit-preset-requests/us-ccda.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions http-client-tests/resources/preset-requests/cda.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions http-client-tests/resources/preset-requests/default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cliContext": {
"baseEngine": "DEFAULT",
"locale": "en"
},
"filesToValidate": [
{
"fileName": "manually_entered_file.json",
"fileContent": "{\n \"resourceType\": \"Observation\",\n \"id\": \"blood-pressure\",\n \"meta\": {\n \"profile\": [\n \"http://hl7.org/fhir/StructureDefinition/vitalsigns\"\n ]\n },\n \"text\": {\n \"status\": \"generated\",\n \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: blood-pressure</p><p><b>meta</b>: </p><p><b>identifier</b>: urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281</p><p><b>basedOn</b>: </p><p><b>status</b>: final</p><p><b>category</b>: Vital Signs <span>(Details : {http://terminology.hl7.org/CodeSystem/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})</span></p><p><b>code</b>: Blood pressure systolic &amp; diastolic <span>(Details : {LOINC code '85354-9' = 'Blood pressure panel with all children optional', given as 'Blood pressure panel with all children optional'})</span></p><p><b>subject</b>: <a>Patient/example</a></p><p><b>effective</b>: 17/09/2012</p><p><b>performer</b>: <a>Practitioner/example</a></p><p><b>interpretation</b>: Below low normal <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'L' = 'Low', given as 'low'})</span></p><p><b>bodySite</b>: Right arm <span>(Details : {SNOMED CT code '368209003' = 'Right upper arm', given as 'Right arm'})</span></p><blockquote><p><b>component</b></p><p><b>code</b>: Systolic blood pressure <span>(Details : {LOINC code '8480-6' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {SNOMED CT code '271649006' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {http://acme.org/devices/clinical-codes code 'bp-s' = 'bp-s', given as 'Systolic Blood pressure'})</span></p><p><b>value</b>: 107 mmHg<span> (Details: UCUM code mm[Hg] = 'mmHg')</span></p><p><b>interpretation</b>: Normal <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'N' = 'Normal', given as 'normal'})</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Diastolic blood pressure <span>(Details : {LOINC code '8462-4' = 'Diastolic blood pressure', given as 'Diastolic blood pressure'})</span></p><p><b>value</b>: 60 mmHg<span> (Details: UCUM code mm[Hg] = 'mmHg')</span></p><p><b>interpretation</b>: Below low normal <span>(Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'L' = 'Low', given as 'low'})</span></p></blockquote></div>\"\n },\n \"identifier\": [\n {\n \"system\": \"urn:ietf:rfc:3986\",\n \"value\": \"urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281\"\n }\n ],\n \"basedOn\": [\n {\n \"identifier\": {\n \"system\": \"https://acme.org/identifiers\",\n \"value\": \"1234\"\n }\n }\n ],\n \"status\": \"final\",\n \"category\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n \"code\": \"vital-signs\",\n \"display\": \"Vital Signs\"\n }\n ]\n }\n ],\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"85354-9\",\n \"display\": \"Blood pressure panel with all children optional\"\n }\n ],\n \"text\": \"Blood pressure systolic & diastolic\"\n },\n \"subject\": {\n \"reference\": \"Patient/example\"\n },\n \"effectiveDateTime\": \"2012-09-17\",\n \"performer\": [\n {\n \"reference\": \"Practitioner/example\"\n }\n ],\n \"interpretation\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\n \"code\": \"L\",\n \"display\": \"low\"\n }\n ],\n \"text\": \"Below low normal\"\n }\n ],\n \"bodySite\": {\n \"coding\": [\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"368209003\",\n \"display\": \"Right arm\"\n }\n ]\n },\n \"component\": [\n {\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"8480-6\",\n \"display\": \"Systolic blood pressure\"\n },\n {\n \"system\": \"http://snomed.info/sct\",\n \"code\": \"271649006\",\n \"display\": \"Systolic blood pressure\"\n }\n ]\n },\n \"valueQuantity\": {\n \"value\": 107,\n \"unit\": \"mmHg\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"mm[Hg]\"\n },\n \"interpretation\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\n \"code\": \"N\",\n \"display\": \"normal\"\n }\n ],\n \"text\": \"Normal\"\n }\n ]\n },\n {\n \"code\": {\n \"coding\": [\n {\n \"system\": \"http://loinc.org\",\n \"code\": \"8462-4\",\n \"display\": \"Diastolic blood pressure\"\n }\n ]\n },\n \"valueQuantity\": {\n \"value\": 60,\n \"unit\": \"mmHg\",\n \"system\": \"http://unitsofmeasure.org\",\n \"code\": \"mm[Hg]\"\n },\n \"interpretation\": [\n {\n \"coding\": [\n {\n \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\n \"code\": \"L\",\n \"display\": \"low\"\n }\n ],\n \"text\": \"Below low normal\"\n }\n ]\n }\n ]\n}",
"fileType": null
}
]
}
16 changes: 16 additions & 0 deletions http-client-tests/resources/preset-requests/ips-au.json

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions http-client-tests/resources/preset-requests/ips-nz.json

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions http-client-tests/resources/preset-requests/ips.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions http-client-tests/resources/preset-requests/sql-on-fhir.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cliContext": {
"baseEngine": "SQL_VIEW",
"locale": "en"
},
"filesToValidate": [
{
"fileName": "manually_entered_file.json",
"fileContent": "{\n \"resourceType\": \"http://hl7.org/fhir/uv/sql-on-fhir/StructureDefinition/ViewDefinition\",\n \"select\": [\n {\n \"column\": [\n {\n \"path\": \"getResourceKey()\",\n \"name\": \"patient_id\"\n }\n ]\n },\n {\n \"column\": [\n {\n \"path\": \"line.join('\\n')\",\n \"name\": \"street\",\n \"description\": \"The full street address, including newlines if present.\"\n },\n {\n \"path\": \"use\",\n \"name\": \"use\"\n },\n {\n \"path\": \"city\",\n \"name\": \"city\"\n },\n {\n \"path\": \"postalCode\",\n \"name\": \"zip\"\n }\n ],\n \"forEach\": \"address\"\n }\n ],\n \"name\": \"patient_addresses\",\n \"status\": \"draft\",\n \"resource\": \"Patient\"\n }",
"fileType": null
}
]
}
13 changes: 13 additions & 0 deletions http-client-tests/resources/preset-requests/us-ccda.json

Large diffs are not rendered by default.

Loading
Loading