fhirpath-rb 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +25 -0
- data/CLAUDE.md +59 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +12 -0
- data/ext/fhir_path_parser/extconf.rb +40 -0
- data/lib/fhirpath/engine/evaluators/expressions.rb +59 -0
- data/lib/fhirpath/engine/evaluators/literals.rb +70 -0
- data/lib/fhirpath/engine/evaluators/member_invocation.rb +109 -0
- data/lib/fhirpath/engine/evaluators.rb +130 -0
- data/lib/fhirpath/engine/invocations/aggregate.rb +48 -0
- data/lib/fhirpath/engine/invocations/collections.rb +32 -0
- data/lib/fhirpath/engine/invocations/combining.rb +30 -0
- data/lib/fhirpath/engine/invocations/datetime.rb +34 -0
- data/lib/fhirpath/engine/invocations/equality.rb +95 -0
- data/lib/fhirpath/engine/invocations/equivalence.rb +138 -0
- data/lib/fhirpath/engine/invocations/existence.rb +117 -0
- data/lib/fhirpath/engine/invocations/filtering.rb +107 -0
- data/lib/fhirpath/engine/invocations/inequality.rb +92 -0
- data/lib/fhirpath/engine/invocations/logic.rb +74 -0
- data/lib/fhirpath/engine/invocations/math.rb +109 -0
- data/lib/fhirpath/engine/invocations/math_functions.rb +121 -0
- data/lib/fhirpath/engine/invocations/misc.rb +144 -0
- data/lib/fhirpath/engine/invocations/misc_converts_to.rb +91 -0
- data/lib/fhirpath/engine/invocations/navigation.rb +102 -0
- data/lib/fhirpath/engine/invocations/registry_strings_and_math.rb +48 -0
- data/lib/fhirpath/engine/invocations/strings.rb +139 -0
- data/lib/fhirpath/engine/invocations/strings_encoding.rb +68 -0
- data/lib/fhirpath/engine/invocations/subsetting.rb +15 -0
- data/lib/fhirpath/engine/invocations/types.rb +36 -0
- data/lib/fhirpath/engine/invocations.rb +118 -0
- data/lib/fhirpath/engine/nodes/fp_date_time.rb +140 -0
- data/lib/fhirpath/engine/nodes/fp_date_time_arithmetic.rb +112 -0
- data/lib/fhirpath/engine/nodes/fp_quantity.rb +142 -0
- data/lib/fhirpath/engine/nodes/fp_quantity_deep_equal.rb +67 -0
- data/lib/fhirpath/engine/nodes/fp_time.rb +139 -0
- data/lib/fhirpath/engine/nodes/fp_time_arithmetic.rb +111 -0
- data/lib/fhirpath/engine/nodes/resource_node.rb +66 -0
- data/lib/fhirpath/engine/nodes/type_info.rb +92 -0
- data/lib/fhirpath/engine/param_resolution.rb +74 -0
- data/lib/fhirpath/engine/util.rb +117 -0
- data/lib/fhirpath/engine.rb +100 -0
- data/lib/fhirpath/models/dstu2/choiceTypePaths.json +1041 -0
- data/lib/fhirpath/models/dstu2/path2Type.json +4728 -0
- data/lib/fhirpath/models/dstu2/pathsDefinedElsewhere.json +21 -0
- data/lib/fhirpath/models/dstu2/type2Parent.json +141 -0
- data/lib/fhirpath/models/r4/choiceTypePaths.json +1365 -0
- data/lib/fhirpath/models/r4/path2Type.json +7707 -0
- data/lib/fhirpath/models/r4/pathsDefinedElsewhere.json +57 -0
- data/lib/fhirpath/models/r4/type2Parent.json +211 -0
- data/lib/fhirpath/models/r5/choiceTypePaths.json +1883 -0
- data/lib/fhirpath/models/r5/path2Type.json +9653 -0
- data/lib/fhirpath/models/r5/pathsDefinedElsewhere.json +80 -0
- data/lib/fhirpath/models/r5/type2Parent.json +234 -0
- data/lib/fhirpath/models/stu3/choiceTypePaths.json +991 -0
- data/lib/fhirpath/models/stu3/path2Type.json +5729 -0
- data/lib/fhirpath/models/stu3/pathsDefinedElsewhere.json +37 -0
- data/lib/fhirpath/models/stu3/type2Parent.json +173 -0
- data/lib/fhirpath/models.rb +25 -0
- data/lib/fhirpath/parser/FHIRPath.g4 +172 -0
- data/lib/fhirpath/parser/ast_builder.rb +51 -0
- data/lib/fhirpath/parser.rb +21 -0
- data/lib/fhirpath/version.rb +5 -0
- data/lib/fhirpath.rb +117 -0
- data/rakelib/parser.rake +146 -0
- data/sig/fhirpath.rbs +14 -0
- metadata +168 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Bundle.entry.link": "Bundle.link",
|
|
3
|
+
"Composition.section.section": "Composition.section",
|
|
4
|
+
"ConceptMap.element.target.product": "ConceptMap.element.target.dependsOn",
|
|
5
|
+
"Conformance.rest.searchParam": "Conformance.rest.resource.searchParam",
|
|
6
|
+
"ImplementationGuide.page.page": "ImplementationGuide.page",
|
|
7
|
+
"Observation.component.referenceRange": "Observation.referenceRange",
|
|
8
|
+
"OperationDefinition.parameter.part": "OperationDefinition.parameter",
|
|
9
|
+
"Parameters.parameter.part": "Parameters.parameter",
|
|
10
|
+
"QuestionnaireResponse.group.group": "QuestionnaireResponse.group",
|
|
11
|
+
"QuestionnaireResponse.group.question.answer.group": "QuestionnaireResponse.group",
|
|
12
|
+
"TestScript.setup.metadata": "TestScript.metadata",
|
|
13
|
+
"TestScript.teardown.action.operation": "TestScript.setup.action.operation",
|
|
14
|
+
"TestScript.test.action.assert": "TestScript.setup.action.assert",
|
|
15
|
+
"TestScript.test.action.operation": "TestScript.setup.action.operation",
|
|
16
|
+
"TestScript.test.metadata": "TestScript.metadata",
|
|
17
|
+
"ValueSet.codeSystem.concept.concept": "ValueSet.codeSystem.concept",
|
|
18
|
+
"ValueSet.compose.exclude": "ValueSet.compose.include",
|
|
19
|
+
"ValueSet.compose.include.concept.designation": "ValueSet.codeSystem.concept.designation",
|
|
20
|
+
"ValueSet.expansion.contains.contains": "ValueSet.expansion.contains"
|
|
21
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Account": "DomainResource",
|
|
3
|
+
"Address": "Element",
|
|
4
|
+
"Age": "Quantity",
|
|
5
|
+
"AllergyIntolerance": "DomainResource",
|
|
6
|
+
"Annotation": "Element",
|
|
7
|
+
"Appointment": "DomainResource",
|
|
8
|
+
"AppointmentResponse": "DomainResource",
|
|
9
|
+
"Attachment": "Element",
|
|
10
|
+
"AuditEvent": "DomainResource",
|
|
11
|
+
"BackboneElement": "Element",
|
|
12
|
+
"Basic": "DomainResource",
|
|
13
|
+
"Binary": "Resource",
|
|
14
|
+
"BodySite": "DomainResource",
|
|
15
|
+
"Bundle": "Resource",
|
|
16
|
+
"CarePlan": "DomainResource",
|
|
17
|
+
"Claim": "DomainResource",
|
|
18
|
+
"ClaimResponse": "DomainResource",
|
|
19
|
+
"ClinicalImpression": "DomainResource",
|
|
20
|
+
"CodeableConcept": "Element",
|
|
21
|
+
"Coding": "Element",
|
|
22
|
+
"Communication": "DomainResource",
|
|
23
|
+
"CommunicationRequest": "DomainResource",
|
|
24
|
+
"Composition": "DomainResource",
|
|
25
|
+
"ConceptMap": "DomainResource",
|
|
26
|
+
"Condition": "DomainResource",
|
|
27
|
+
"Conformance": "DomainResource",
|
|
28
|
+
"ContactPoint": "Element",
|
|
29
|
+
"Contract": "DomainResource",
|
|
30
|
+
"Count": "Quantity",
|
|
31
|
+
"Coverage": "DomainResource",
|
|
32
|
+
"DataElement": "DomainResource",
|
|
33
|
+
"DetectedIssue": "DomainResource",
|
|
34
|
+
"Device": "DomainResource",
|
|
35
|
+
"DeviceComponent": "DomainResource",
|
|
36
|
+
"DeviceMetric": "DomainResource",
|
|
37
|
+
"DeviceUseRequest": "DomainResource",
|
|
38
|
+
"DeviceUseStatement": "DomainResource",
|
|
39
|
+
"DiagnosticOrder": "DomainResource",
|
|
40
|
+
"DiagnosticReport": "DomainResource",
|
|
41
|
+
"Distance": "Quantity",
|
|
42
|
+
"DocumentManifest": "DomainResource",
|
|
43
|
+
"DocumentReference": "DomainResource",
|
|
44
|
+
"DomainResource": "Resource",
|
|
45
|
+
"Duration": "Quantity",
|
|
46
|
+
"ElementDefinition": "Element",
|
|
47
|
+
"EligibilityRequest": "DomainResource",
|
|
48
|
+
"EligibilityResponse": "DomainResource",
|
|
49
|
+
"Encounter": "DomainResource",
|
|
50
|
+
"EnrollmentRequest": "DomainResource",
|
|
51
|
+
"EnrollmentResponse": "DomainResource",
|
|
52
|
+
"EpisodeOfCare": "DomainResource",
|
|
53
|
+
"ExplanationOfBenefit": "DomainResource",
|
|
54
|
+
"Extension": "Element",
|
|
55
|
+
"FamilyMemberHistory": "DomainResource",
|
|
56
|
+
"Flag": "DomainResource",
|
|
57
|
+
"Goal": "DomainResource",
|
|
58
|
+
"Group": "DomainResource",
|
|
59
|
+
"HealthcareService": "DomainResource",
|
|
60
|
+
"HumanName": "Element",
|
|
61
|
+
"Identifier": "Element",
|
|
62
|
+
"ImagingObjectSelection": "DomainResource",
|
|
63
|
+
"ImagingStudy": "DomainResource",
|
|
64
|
+
"Immunization": "DomainResource",
|
|
65
|
+
"ImmunizationRecommendation": "DomainResource",
|
|
66
|
+
"ImplementationGuide": "DomainResource",
|
|
67
|
+
"List": "DomainResource",
|
|
68
|
+
"Location": "DomainResource",
|
|
69
|
+
"Media": "DomainResource",
|
|
70
|
+
"Medication": "DomainResource",
|
|
71
|
+
"MedicationAdministration": "DomainResource",
|
|
72
|
+
"MedicationDispense": "DomainResource",
|
|
73
|
+
"MedicationOrder": "DomainResource",
|
|
74
|
+
"MedicationStatement": "DomainResource",
|
|
75
|
+
"MessageHeader": "DomainResource",
|
|
76
|
+
"Meta": "Element",
|
|
77
|
+
"Money": "Quantity",
|
|
78
|
+
"NamingSystem": "DomainResource",
|
|
79
|
+
"Narrative": "Element",
|
|
80
|
+
"NutritionOrder": "DomainResource",
|
|
81
|
+
"Observation": "DomainResource",
|
|
82
|
+
"OperationDefinition": "DomainResource",
|
|
83
|
+
"OperationOutcome": "DomainResource",
|
|
84
|
+
"Order": "DomainResource",
|
|
85
|
+
"OrderResponse": "DomainResource",
|
|
86
|
+
"Organization": "DomainResource",
|
|
87
|
+
"Parameters": "Resource",
|
|
88
|
+
"Patient": "DomainResource",
|
|
89
|
+
"PaymentNotice": "DomainResource",
|
|
90
|
+
"PaymentReconciliation": "DomainResource",
|
|
91
|
+
"Period": "Element",
|
|
92
|
+
"Person": "DomainResource",
|
|
93
|
+
"Practitioner": "DomainResource",
|
|
94
|
+
"Procedure": "DomainResource",
|
|
95
|
+
"ProcedureRequest": "DomainResource",
|
|
96
|
+
"ProcessRequest": "DomainResource",
|
|
97
|
+
"ProcessResponse": "DomainResource",
|
|
98
|
+
"Provenance": "DomainResource",
|
|
99
|
+
"Quantity": "Element",
|
|
100
|
+
"Questionnaire": "DomainResource",
|
|
101
|
+
"QuestionnaireResponse": "DomainResource",
|
|
102
|
+
"Range": "Element",
|
|
103
|
+
"Ratio": "Element",
|
|
104
|
+
"Reference": "Element",
|
|
105
|
+
"ReferralRequest": "DomainResource",
|
|
106
|
+
"RelatedPerson": "DomainResource",
|
|
107
|
+
"RiskAssessment": "DomainResource",
|
|
108
|
+
"SampledData": "Element",
|
|
109
|
+
"Schedule": "DomainResource",
|
|
110
|
+
"SearchParameter": "DomainResource",
|
|
111
|
+
"Signature": "Element",
|
|
112
|
+
"SimpleQuantity": "Quantity",
|
|
113
|
+
"Slot": "DomainResource",
|
|
114
|
+
"Specimen": "DomainResource",
|
|
115
|
+
"StructureDefinition": "DomainResource",
|
|
116
|
+
"Subscription": "DomainResource",
|
|
117
|
+
"Substance": "DomainResource",
|
|
118
|
+
"SupplyDelivery": "DomainResource",
|
|
119
|
+
"SupplyRequest": "DomainResource",
|
|
120
|
+
"TestScript": "DomainResource",
|
|
121
|
+
"Timing": "Element",
|
|
122
|
+
"ValueSet": "DomainResource",
|
|
123
|
+
"VisionPrescription": "DomainResource",
|
|
124
|
+
"base64Binary": "Element",
|
|
125
|
+
"boolean": "Element",
|
|
126
|
+
"code": "string",
|
|
127
|
+
"date": "Element",
|
|
128
|
+
"dateTime": "Element",
|
|
129
|
+
"decimal": "Element",
|
|
130
|
+
"id": "string",
|
|
131
|
+
"instant": "Element",
|
|
132
|
+
"integer": "Element",
|
|
133
|
+
"markdown": "string",
|
|
134
|
+
"oid": "uri",
|
|
135
|
+
"positiveInt": "integer",
|
|
136
|
+
"string": "Element",
|
|
137
|
+
"time": "Element",
|
|
138
|
+
"unsignedInt": "integer",
|
|
139
|
+
"uri": "Element",
|
|
140
|
+
"uuid": "uri"
|
|
141
|
+
}
|