Skip to content

Commit

Permalink
Loading workerContext using the Knowledge manager (google#2449)
Browse files Browse the repository at this point in the history
* wip

* spotless

* Added test in ResourceMapperTest using measles outbreak package

* feedback

* spotless

* updated kdoc

---------

Co-authored-by: Madhuram Jajoo <madhuramjajoo10@gmail.com>
  • Loading branch information
nsabale7 and MJ1998 authored Apr 18, 2024
1 parent be22519 commit 2d1d45d
Show file tree
Hide file tree
Showing 11 changed files with 2,454 additions and 33 deletions.
9 changes: 8 additions & 1 deletion datacapture/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ android {

configureJacocoTestOptions()

sourceSets { getByName("androidTest").apply { resources.setSrcDirs(listOf("sampledata")) } }
sourceSets {
getByName("androidTest").apply { resources.setSrcDirs(listOf("sampledata")) }

getByName("test").apply { resources.setSrcDirs(listOf("sampledata")) }
}

testOptions { animationsDisabled = true }
kotlin { jvmToolchain(11) }
Expand Down Expand Up @@ -105,6 +109,9 @@ dependencies {
testImplementation(Dependencies.mockitoKotlin)
testImplementation(Dependencies.robolectric)
testImplementation(Dependencies.truth)
testImplementation(project(":knowledge")) {
exclude(group = Dependencies.androidFhirGroup, module = Dependencies.androidFhirEngineModule)
}

constraints {
Dependencies.hapiFhirConstraints().forEach { (libName, constraints) ->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
map "http://worldhealthorganization.github.io/smart-ot/StructureMap/MeaslesQuestionnaireToResources" = "MeaslesQuestionnaireToResources"
uses "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse" alias QuestionnaireResponse as source
uses "http://hl7.org/fhir/StructureDefinition/Bundle" alias MeaslesCIFBundle as target

imports "http://worldhealthorganization.github.io/smart-ot/StructureMap/MeaslesLogicalModelToResources"
imports "http://worldhealthorganization.github.io/smart-ot/StructureMap/MeaslesQuestionnaireToLogicalModel"


group MeaslesQuestionnaireToResources(source qr : QuestionnaireResponse, target bundleCif : MeaslesCIFBundle) {
qr -> create ("http://worldhealthorganization.github.io/smart-ot/StructureDefinition/SOTMeasles") as model then {
qr -> model then MeaslesQuestionnaireToLogicalModel(qr,model) "QRtoLM";
qr -> bundleCif then MeaslesLogicalModelToResources (model, bundleCif) "LMtoBundle";
} "QRtoBundle";
}
Binary file not shown.
Binary file not shown.
1,019 changes: 1,019 additions & 0 deletions datacapture/sampledata/measles-outbreak/questionnaire_outbreak.json

Large diffs are not rendered by default.

Loading

0 comments on commit 2d1d45d

Please sign in to comment.