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

Date Error Evaluating DSF with Histories v14 #12

Closed
jeffeastman opened this issue Nov 6, 2017 · 4 comments
Closed

Date Error Evaluating DSF with Histories v14 #12

jeffeastman opened this issue Nov 6, 2017 · 4 comments
Assignees

Comments

@jeffeastman
Copy link

jeffeastman commented Nov 6, 2017

Measure evaluates fine in-memory with mostly cqf-ruler code but fails on cqf-ruler.

Caused by: ca.uhn.fhir.parser.DataFormatException: Invalid date/time format: "-value"
	at ca.uhn.fhir.model.primitive.BaseDateTimeDt.throwBadDateFormat(BaseDateTimeDt.java:650)
	at ca.uhn.fhir.model.primitive.BaseDateTimeDt.parseInt(BaseDateTimeDt.java:444)
	at ca.uhn.fhir.model.primitive.BaseDateTimeDt.parse(BaseDateTimeDt.java:347)
	at ca.uhn.fhir.model.primitive.BaseDateTimeDt.parse(BaseDateTimeDt.java:39)
	at ca.uhn.fhir.model.api.BasePrimitive.setValueAsString(BasePrimitive.java:111)
	at ca.uhn.fhir.model.primitive.BaseDateTimeDt.setValueAsString(BaseDateTimeDt.java:638)
	at ca.uhn.fhir.rest.param.DateParam.setValueAsString(DateParam.java:202)
	at ca.uhn.fhir.rest.param.DateParam.<init>(DateParam.java:89)
	at org.opencds.cqf.providers.JpaDataProvider.retrieve(JpaDataProvider.java:84)
	at org.opencds.cqf.cql.elm.execution.RetrieveEvaluator.evaluate(RetrieveEvaluator.java:52)
	at org.opencds.cqf.cql.elm.execution.QueryEvaluator.evaluate(QueryEvaluator.java:226)
	at org.opencds.cqf.cql.elm.execution.ExistsEvaluator.evaluate(ExistsEvaluator.java:32)
	at org.opencds.cqf.cql.elm.execution.AndEvaluator.evaluate(AndEvaluator.java:38)
	at org.opencds.cqf.cql.elm.execution.ExpressionDefEvaluator.evaluate(ExpressionDefEvaluator.java:20)
	at org.opencds.cqf.helpers.FhirMeasureEvaluator.resolveGroupings(FhirMeasureEvaluator.java:28)
	at org.opencds.cqf.helpers.FhirMeasureEvaluator.evaluate(FhirMeasureEvaluator.java:84)
	at org.opencds.cqf.helpers.FhirMeasureEvaluator.evaluate(FhirMeasureEvaluator.java:88)
	at org.opencds.cqf.providers.FHIRMeasureResourceProvider.evaluatePatientMeasure(FHIRMeasureResourceProvider.java:223)
	at org.opencds.cqf.providers.FHIRMeasureResourceProvider.evaluateMeasure(FHIRMeasureResourceProvider.java:195)
	... 37 common frames omitted
2017-11-06 15:09:39.511 [http-nio-8080-exec-5] INFO  logging.accesslog [LoggingInterceptor.java:155] ERROR - extended-operation-instance - Measure/measure-dsf

@c-schuler c-schuler self-assigned this Nov 6, 2017
@c-schuler
Copy link
Contributor

c-schuler commented Nov 6, 2017

Hi Jeff,

Interesting. Looks like an issue with DateParam construction in the data provider. We are in the process of selecting test patients from the v14 histories. I will be able to debug this once that is finished. However, if you provide the patient id and the measurement period you're using, that may speed up the resolution of this issue (same for issue #13).

Thanks,
Chris

@jeffeastman
Copy link
Author

jeffeastman commented Nov 7, 2017 via email

@jeffeastman
Copy link
Author

jeffeastman commented Nov 7, 2017

I've written a couple of my own classes but the rest of the computation is entirely cqf-ruler-ruler.

  • public class InMemoryMappedResourceProvider extends FhirDataProviderStu3 loads the published FHIR network, patients & histories and evaluates them in memory
  • public class InMemoryPopulationResourceProvider extends FhirDataProviderStu3 uses internal PatientGen "resources" to evaluate in memory
  • public class LocalFhirTerminologyProvider implements TerminologyProvider uses my file-based cache of value sets

I've also copied two classes from cqf-ruler-ruler and edited them a bit for my purposes:

  • public class FhirMeasureEvaluator - added some output printlns
  • public class FhirMeasureBundler - no changes to this

@jeffeastman
Copy link
Author

This is now fixed so closing the issue.

http://localhost:8080/cqf-ruler/baseDstu3/Patient/Patient-1137/_history/1
http://localhost:8080/cqf-ruler/baseDstu3/Patient/Patient-6529/_history/1
	patient is in initial-population
	patient is in denominator
http://localhost:8080/cqf-ruler/baseDstu3/Patient/Patient-1132/_history/1
	patient is in initial-population
	patient is in numerator
	patient is in denominator
	patient is in denominator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants