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

No mapping for CQL Long to FHIR v4.3 Integer64 - throw exception #553

Open
baseTwo opened this issue Sep 18, 2024 · 2 comments
Open

No mapping for CQL Long to FHIR v4.3 Integer64 - throw exception #553

baseTwo opened this issue Sep 18, 2024 · 2 comments

Comments

@baseTwo
Copy link
Collaborator

baseTwo commented Sep 18, 2024

The following CQL failed when running with the PackagerCLI when uncommenting the two lines to test CQL Long.

library EchoCQLTypes version '1.0.0'
using FHIR version '4.0.1'
parameter inputBoolean Boolean
parameter inputInteger Integer
// parameter inputLong Long
parameter inputDecimal Decimal
parameter inputDate Date
parameter inputDateTime DateTime
parameter inputTime Time
parameter inputString String
parameter inputQuantity Quantity
parameter inputRatio Ratio
parameter inputCode Code
parameter inputConcept Concept
parameter inputAny Any
parameter inputIntervalDate Interval<Date>
parameter inputIntervalDateTime Interval<DateTime>
parameter inputIntervalQuantity Interval<Quantity>
parameter inputList List<String>
parameter inputTuple Tuple { name String, age Integer }
parameter inputPatient FHIR.Patient
parameter inputObservation FHIR.Observation
context Patient
define "EchoBoolean": inputBoolean
define "EchoInteger": inputInteger
// define "EchoLong": inputLong
define "EchoDecimal": inputDecimal
define "EchoDate": inputDate
define "EchoDateTime": inputDateTime
define "EchoTime": inputTime
define "EchoString": inputString
define "EchoQuantity": inputQuantity
define "EchoRatio": inputRatio
define "EchoCode": inputCode
define "EchoConcept": inputConcept
define "EchoAny": inputAny
define "EchoIntervalDate": inputIntervalDate
define "EchoIntervalDateTime": inputIntervalDateTime
define "EchoIntervalQuantity": inputIntervalQuantity
define "EchoList": inputList
define "EchoTuple": inputTuple
define "EchoPatient": inputPatient
define "EchoObservation": inputObservation

Exception details:

System.ArgumentException
  HResult=0x80070057
  Message=Unable to identify a valid FHIR type for this parameter. Arg_ParamName_Name
  Source=Hl7.Cql.Packaging
  StackTrace:
   at Hl7.Cql.Packaging.ResourcePackager.ElmParameterToFhir(ParameterDef elmParameter, CqlTypeToFhirTypeMapper typeCrosswalk) in C:\Dev\firely-cql-sdk\Cql\Cql.Packaging\ResourcePackager.cs:line 356

When trying to add the missing mapping in CqlTypeToFhirTypeMapper, there is no Integer64 to pick from in the .NET SDK. (see screenshot below)
Image

Raised the issue to the .NET SDK team in a Slack conversation

@ewoutkramer
Copy link
Member

There is no long in R4, so the lines should stay commented, or it must be mapped to another type!

@baseTwo
Copy link
Collaborator Author

baseTwo commented Sep 20, 2024

While the cql website includes this mapping to Integer64/Long, this FHIR type doesn't exist until v5.

I will just throw an Exception with this detail

@baseTwo baseTwo removed bug Something isn't working Blocked - Waiting on Others labels Sep 20, 2024
@baseTwo baseTwo changed the title Bug - CQL Long type not supported No mapping for CQL Long to FHIR v4.3 Integer64 - throw exception Sep 20, 2024
@baseTwo baseTwo added this to the 2024 Q3 (September WGM) milestone Sep 20, 2024
@baseTwo baseTwo self-assigned this Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants