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

Generating careplan using workflow library. #1403

Closed
parthfloyd opened this issue May 19, 2022 · 3 comments · Fixed by #1603
Closed

Generating careplan using workflow library. #1403

parthfloyd opened this issue May 19, 2022 · 3 comments · Fixed by #1603
Assignees
Labels
effort:small Small effort - 2 days P1 High priority issue type:bug Something isn't working

Comments

@parthfloyd
Copy link
Collaborator

parthfloyd commented May 19, 2022

Describe the bug
When trying to generate a careplan using the generateCarePlan method from FhirOperator.kt, it fails with an Notimplemented error.

Component
Workflow library

To Reproduce
Steps to reproduce the behavior:

  1. Creating the patient, plandefinition and encounter resource in fhir engine. (Used dummy data from the test files)
  2. Using the generateCarePlan method with the respective id of the resources saved.

Expected behavior
To return the careplan object.

Additional context

  • I tried running it on the demo application, on the master branch.
  • The patient, plandefinition & encounter resources - patient-plandef-encounter.txt.
  • Stack Trace:
    kotlin.NotImplementedError: An operation is not implemented: Not yet implemented
    at com.google.android.fhir.workflow.FhirEngineDal.read(FhirEngineDal.kt:33)
    at org.opencds.cqf.cql.evaluator.plandefinition.r4.PlanDefinitionProcessor.apply(PlanDefinitionProcessor.java:117)
    at com.google.android.fhir.workflow.FhirOperator.generateCarePlan(FhirOperator.kt:188)
    at com.google.android.fhir.demo.ScreenerViewModel$saveScreenerEncounter$1.invokeSuspend(ScreenerViewModel.kt:80)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7839)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

cc: @jingtang10

@vitorpamplona
Copy link
Collaborator

vitorpamplona commented May 19, 2022

Depends on Issues #1189, #1334, #1365, #915, #1374, #656 and PRs: #1326 and #1273 as well as:
- FasterXML's 525
- CQL's 746, PR CQL's 748
- CQL's 640, PR CQL's 745
- CQL's 742, Discussion at CQLEvaluator's 90

EDIT(@jingtang10): see comment below: #1403 (comment)

@parthfloyd
Copy link
Collaborator Author

I tried out the generateCarePlan method again after the FhirEngineDal.read method was implemented.
It failed with a different NotImplementedError, in the PlanDefinitionProcessor.java of CQL-Evaluator.

Precisely, URI Definition & Questionnaire Definition Evaluation is not yet implemented in the resolveDefinition method of PlanDefinitionProcessor. For now the method only supports "PlanDefinition" & "ActivityDefinition".

The Plan Definitions I tested with:

  1. Child Routine Visit Plan Definition
  2. Plan Definiton Emcare

The Error Stack Trace Respectively:

  1. stack-trace-uri-definition-evaluation.txt
  2. stack-trace-questionnaire-definition-evaluation.txt

The Patient & Encounter resource: patient-encounter-resource.txt

References:

  1. PlanDefinitionProcessor.java Github reference
  2. CQL Evaluator Github

cc: @jingtang10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:small Small effort - 2 days P1 High priority issue type:bug Something isn't working
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

4 participants