FirelyTeam / firely-cql-sdk

BSD 3-Clause "New" or "Revised" License
27 stars 16 forks source link

The measures from ecqm-content-qicore-2024 commit 1b3125b are compili… #313

Open richfirely opened 4 months ago

richfirely commented 4 months ago

The latest commit is problematic with many CQL syntax errors. https://github.com/cqframework/ecqm-content-qicore-2024/commit/2e26a4b71d2567b5c450a2c52b44cada7fb3fadd

**This is the CQL and ELM from the latest working commit: https://github.com/cqframework/ecqm-content-qicore-2024/commit/1b3125bfcee6758c8374869327ffefa41b4da08f**

I made the manual fix to QICore AS Date to see how far it would compile the C#. It gets stuck on AHAOverall.

baseTwo commented 4 months ago

Maybe better to wait to include the latest cql files, since they don't compile and it will interfere with testing on the develop-2.0 branch. Will revisit this again as part of the final work for issue #292 after the parallel work is done on improving bindings on branch develop-2.0-bindings

See error and warnings below

Error

EROR: An error occurred while running the packager
Hl7.Cql.Abstractions.Exceptions.CqlException`1[Hl7.Cql.Packaging.CqlToResourcePackagingPipelineErrors]: The following exceptions occurred during Library Packaging:

1. LoadElmFilesException
Hl7.Cql.Abstractions.Exceptions.CqlException`1[Hl7.Cql.Compiler.ExpressionBuildingError]: Exception occurred during expression building.
    Expression Path:
    * LibrarySet named 'C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\LibrarySets\Cms\Elm'
    * Library named 'AHAOverall-2.6.000'
 ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at <>z__ReadOnlyList`1.System.Collections.Generic.IReadOnlyList<T>.get_Item(Int32 index)
   at Hl7.Cql.Compiler.ExpressionBuilder.ExpressionBuilderNode.get_BuilderDebuggerInfo() in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Compiler\ExpressionBuilder.BuilderNode.cs:line 55
   at Hl7.Cql.Compiler.ExpressionBuilder.Hl7.Cql.Compiler.IBuilderNode.get_BuilderDebuggerInfo() in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Compiler\ExpressionBuilder.BuilderNode.cs:line 23
   at Hl7.Cql.Compiler.ExpressionBuilder.ProcessExpressionDef(ExpressionDef expressionDef) in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Compiler\ExpressionBuilder.LibraryDefs.cs:line 123
   at Hl7.Cql.Compiler.LibraryExpressionBuilder.<ProcessLibrary>b__7_0(LibraryExpressionBuilder _) in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Compiler\LibraryExpressionBuilder.cs:line 107
   at Hl7.Cql.Compiler.IBuilderNodeExtensions.CatchRethrowExpressionBuildingException[TBuilderNode,T](TBuilderNode builder, Func`2 fn, Func`2 provideErrorMessage) in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Compiler\IBuilderNodeExtensions.cs:line 53
   --- End of inner exception stack trace ---
   at Hl7.Cql.Compiler.LibraryExpressionBuilder.ProcessLibrary() in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Compiler\LibraryExpressionBuilder.cs:line 46
   at Hl7.Cql.Compiler.LibrarySetExpressionBuilder.<ProcessLibrarySet>b__20_0(LibrarySetExpressionBuilder _) in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Compiler\LibrarySetExpressionBuilder.cs:line 39
   at Hl7.Cql.Compiler.LibrarySetExpressionBuilder.ProcessLibrarySet() in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Compiler\LibrarySetExpressionBuilder.cs:line 35
   at Hl7.Cql.Compiler.LibraryDefinitionsBuilder.ProcessLibrarySet(LibrarySet librarySet, DefinitionDictionary`1 definitions) in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Compiler\LibraryDefinitionsBuilder.cs:line 47
   at Hl7.Cql.Packaging.CqlToResourcePackagingPipeline.BuildExpressions(LibrarySet librarySet, DefinitionDictionary`1 definitions) in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Packaging\CqlToResourcePackagingPipeline.cs:line 125
   at Hl7.Cql.Packaging.CqlToResourcePackagingPipeline.ProcessCqlToResources() in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Packaging\CqlToResourcePackagingPipeline.cs:line 58
   at Hl7.Cql.Packaging.CqlToResourcePackagingPipeline.ProcessCqlToResources() in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\Cql.Packaging\CqlToResourcePackagingPipeline.cs:line 94
   at Hl7.Cql.Packager.PackagerCliProgram.Run() in C:\Dev\FirelyTeam\firely-cql-sdk\firely-cql-sdk\develop-2.0-rich\Cql\PackagerCLI\PackagerCliProgram.cs:line 33

Warnings

WARN: FHIRHelpers-4.3.000: Function 'resolve' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'resolve' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'reference' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'extension' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'extension' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'modifierExtension' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'modifierExtension' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'hasValue' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'getValue' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'ofType' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'is' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'as' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'elementDefinition' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'slice' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'checkModifiers' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'checkModifiers' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'checkModifiers' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'checkModifiers' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'conformsTo' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'memberOf' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'memberOf' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'memberOf' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'subsumes' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'subsumes' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'subsumedBy' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'subsumedBy' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function 'htmlChecks' is declared external, but it was not defined in the expression scope. A stub has been created that throws a NotImplemented exception.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ActivityParticipantType) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ClaimStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}CommunicationRequestStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}CompartmentType) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}CoverageStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}DaysOfWeek) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}DeviceRequestStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}EligibilityRequestStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}EligibilityResponseStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}EnrollmentRequestStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}EnrollmentResponseStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}InvoicePriceComponentType) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}MediaStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}MedicationRequestPriority) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}NutritionOrderStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ObservationStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ParameterUse) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ParticipationStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}PaymentNoticeStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}PaymentReconciliationStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ProcedureStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ReferredDocumentStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}RequestIntent) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}RequestPriority) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}RequestStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ResourceType) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}RiskAssessmentStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}SectionMode) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ServiceRequestIntent) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ServiceRequestPriority) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}ServiceRequestStatus) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}TaskPriority) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}VariableType) skipped; another function matching this signature already exists.
WARN: FHIRHelpers-4.3.000: Function ToString(value {http://hl7.org/fhir}VisionStatus) skipped; another function matching this signature already exists.

WARN: QICoreCommon-2.0.000: Function isDischarge(medicationRequest {http://hl7.org/fhir}MedicationRequest) skipped; another function matching this signature already exists.

WARN: QICoreCommon-2.0.000: Property value can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property low can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: QICoreCommon-2.0.000: Property high can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.

WARN: CumulativeMedicationDuration-4.0.000: Property value can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.

WARN: CumulativeMedicationDuration-4.0.000: Property value can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.

WARN: AHAOverall-2.6.000: Property effective can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.

WARN: AHAOverall-2.6.000: Property performed can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: AHAOverall-2.6.000: Property status can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: AHAOverall-2.6.000: Property value can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: AHAOverall-2.6.000: Property onset can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: AHAOverall-2.6.000: Property lastOccurrence can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: AHAOverall-2.6.000: Property value can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
WARN: AHAOverall-2.6.000: Property clinicalStatus can't be known at design time, and will be late-bound, slowing performance.  Consider casting the source first so that this property can be definitely bound.
richfirely commented 4 months ago

Agree, just doing the yeomans part for now.

ewoutkramer commented 1 month ago

How to bring this up to date?