diff --git a/davincipas/Dependencies.toml b/davincipas/Dependencies.toml index dc81fd8b..53440ff9 100644 --- a/davincipas/Dependencies.toml +++ b/davincipas/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.12.2" +distribution-version = "2201.12.8" [[package]] org = "ballerina" @@ -44,7 +44,7 @@ modules = [ [[package]] org = "ballerina" name = "crypto" -version = "2.9.0" +version = "2.9.1" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "time"} @@ -53,7 +53,7 @@ dependencies = [ [[package]] org = "ballerina" name = "data.jsondata" -version = "1.1.0" +version = "1.1.2" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.object"} @@ -73,7 +73,7 @@ dependencies = [ [[package]] org = "ballerina" name = "http" -version = "2.14.0" +version = "2.14.6" dependencies = [ {org = "ballerina", name = "auth"}, {org = "ballerina", name = "cache"}, @@ -230,7 +230,7 @@ dependencies = [ [[package]] org = "ballerina" name = "oauth2" -version = "2.14.0" +version = "2.14.1" dependencies = [ {org = "ballerina", name = "cache"}, {org = "ballerina", name = "crypto"}, @@ -260,10 +260,11 @@ dependencies = [ [[package]] org = "ballerina" name = "task" -version = "2.7.0" +version = "2.10.0" dependencies = [ {org = "ballerina", name = "jballerina.java"}, - {org = "ballerina", name = "time"} + {org = "ballerina", name = "time"}, + {org = "ballerina", name = "uuid"} ] [[package]] @@ -296,7 +297,7 @@ dependencies = [ [[package]] org = "ballerinax" name = "health.base" -version = "1.1.0" +version = "1.1.1" dependencies = [ {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, @@ -335,9 +336,23 @@ version = "2.0.1" dependencies = [ {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "log"}, - {org = "ballerinax", name = "health.fhir.r4"} + {org = "ballerinax", name = "health.fhir.r4"}, + {org = "ballerinax", name = "health.fhir.r4.international401"} ] modules = [ {org = "ballerinax", packageName = "health.fhir.r4.davincipas", moduleName = "health.fhir.r4.davincipas"} ] +[[package]] +org = "ballerinax" +name = "health.fhir.r4.international401" +version = "3.0.1" +dependencies = [ + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "log"}, + {org = "ballerinax", name = "health.fhir.r4"} +] +modules = [ + {org = "ballerinax", packageName = "health.fhir.r4.international401", moduleName = "health.fhir.r4.international401"} +] + diff --git a/davincipas/Package.md b/davincipas/Package.md index 83c740cb..61bb07e3 100644 --- a/davincipas/Package.md +++ b/davincipas/Package.md @@ -1,7 +1,7 @@ Ballerina package containing FHIR resource data models compliant with http://hl7.org/fhir/us/davinci-pas/ implementation guide. -# FHIR R4 davincipas package +# FHIR R4 health_fhir_r4_davincipas package ## Package Overview @@ -21,73 +21,76 @@ compliant with http://hl7.org/fhir/us/davinci-pas/ implementation guide. | | | |------------------|---------------------------------------------| | 1). PASLocation | [[Definition]][s1] [[Ballerina Record]][m1] | -| 2). PASDeviceRequest | [[Definition]][s2] [[Ballerina Record]][m2] | -| 3). PASClaim | [[Definition]][s3] [[Ballerina Record]][m3] | -| 4). PASRequestor | [[Definition]][s4] [[Ballerina Record]][m4] | -| 5). PASBeneficiary | [[Definition]][s5] [[Ballerina Record]][m5] | -| 6). PASPractitionerRole | [[Definition]][s6] [[Ballerina Record]][m6] | -| 7). PASClaimInquiryResponse | [[Definition]][s7] [[Ballerina Record]][m7] | -| 8). PASCommunicationRequest | [[Definition]][s8] [[Ballerina Record]][m8] | -| 9). PASInsurer | [[Definition]][s9] [[Ballerina Record]][m9] | -| 10). PASServiceRequest | [[Definition]][s10] [[Ballerina Record]][m10] | -| 11). PASClaimInquiry | [[Definition]][s11] [[Ballerina Record]][m11] | -| 12). PASTask | [[Definition]][s12] [[Ballerina Record]][m12] | -| 13). PASClaimResponse | [[Definition]][s13] [[Ballerina Record]][m13] | -| 14). PASOrganization | [[Definition]][s14] [[Ballerina Record]][m14] | -| 15). PASSubscriber | [[Definition]][s15] [[Ballerina Record]][m15] | -| 16). PASNutritionOrder | [[Definition]][s16] [[Ballerina Record]][m16] | -| 17). PASMedicationRequest | [[Definition]][s17] [[Ballerina Record]][m17] | -| 18). PASCoverage | [[Definition]][s18] [[Ballerina Record]][m18] | -| 19). PASPractitioner | [[Definition]][s19] [[Ballerina Record]][m19] | -| 20). PASClaimUpdate | [[Definition]][s20] [[Ballerina Record]][m20] | -| 21). PASClaimResponseBase | [[Definition]][s21] [[Ballerina Record]][m21] | -| 22). PASEncounter | [[Definition]][s22] [[Ballerina Record]][m22] | -| 23). PASClaimBase | [[Definition]][s23] [[Ballerina Record]][m23] | +| 2). PASSubscription | [[Definition]][s2] [[Ballerina Record]][m2] | +| 3). PASDeviceRequest | [[Definition]][s3] [[Ballerina Record]][m3] | +| 4). PASClaim | [[Definition]][s4] [[Ballerina Record]][m4] | +| 5). PASRequestor | [[Definition]][s5] [[Ballerina Record]][m5] | +| 6). PASBeneficiary | [[Definition]][s6] [[Ballerina Record]][m6] | +| 7). PASPractitionerRole | [[Definition]][s7] [[Ballerina Record]][m7] | +| 8). PASClaimInquiryResponse | [[Definition]][s8] [[Ballerina Record]][m8] | +| 9). PASCommunicationRequest | [[Definition]][s9] [[Ballerina Record]][m9] | +| 10). PASInsurer | [[Definition]][s10] [[Ballerina Record]][m10] | +| 11). PASServiceRequest | [[Definition]][s11] [[Ballerina Record]][m11] | +| 12). PASClaimInquiry | [[Definition]][s12] [[Ballerina Record]][m12] | +| 13). PASTask | [[Definition]][s13] [[Ballerina Record]][m13] | +| 14). PASClaimResponse | [[Definition]][s14] [[Ballerina Record]][m14] | +| 15). PASOrganization | [[Definition]][s15] [[Ballerina Record]][m15] | +| 16). PASSubscriber | [[Definition]][s16] [[Ballerina Record]][m16] | +| 17). PASNutritionOrder | [[Definition]][s17] [[Ballerina Record]][m17] | +| 18). PASMedicationRequest | [[Definition]][s18] [[Ballerina Record]][m18] | +| 19). PASCoverage | [[Definition]][s19] [[Ballerina Record]][m19] | +| 20). PASPractitioner | [[Definition]][s20] [[Ballerina Record]][m20] | +| 21). PASClaimUpdate | [[Definition]][s21] [[Ballerina Record]][m21] | +| 22). PASClaimResponseBase | [[Definition]][s22] [[Ballerina Record]][m22] | +| 23). PASEncounter | [[Definition]][s23] [[Ballerina Record]][m23] | +| 24). PASClaimBase | [[Definition]][s24] [[Ballerina Record]][m24] | -[m1]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASLocation -[m2]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASDeviceRequest -[m3]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASClaim -[m4]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASRequestor -[m5]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASBeneficiary -[m6]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASPractitionerRole -[m7]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASClaimInquiryResponse -[m8]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASCommunicationRequest -[m9]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASInsurer -[m10]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASServiceRequest -[m11]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASClaimInquiry -[m12]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASTask -[m13]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASClaimResponse -[m14]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASOrganization -[m15]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASSubscriber -[m16]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASNutritionOrder -[m17]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASMedicationRequest -[m18]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASCoverage -[m19]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASPractitioner -[m20]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASClaimUpdate -[m21]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASClaimResponseBase -[m22]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASEncounter -[m23]: https://lib.ballerina.io/healthcare/davincipas/1.0.0#PASClaimBase +[m1]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASLocation +[m2]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASSubscription +[m3]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASDeviceRequest +[m4]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASClaim +[m5]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASRequestor +[m6]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASBeneficiary +[m7]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASPractitionerRole +[m8]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASClaimInquiryResponse +[m9]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASCommunicationRequest +[m10]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASInsurer +[m11]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASServiceRequest +[m12]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASClaimInquiry +[m13]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASTask +[m14]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASClaimResponse +[m15]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASOrganization +[m16]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASSubscriber +[m17]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASNutritionOrder +[m18]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASMedicationRequest +[m19]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASCoverage +[m20]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASPractitioner +[m21]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASClaimUpdate +[m22]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASClaimResponseBase +[m23]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASEncounter +[m24]: https://lib.ballerina.io/ballerinax/health.fhir.r4.davincipas/1.0.0#PASClaimBase [s1]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-location -[s2]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-devicerequest -[s3]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim -[s4]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-requestor -[s5]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary -[s6]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-practitionerrole -[s7]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claiminquiryresponse -[s8]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-communicationrequest -[s9]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-insurer -[s10]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-servicerequest -[s11]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-inquiry -[s12]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-task -[s13]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claimresponse -[s14]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-organization -[s15]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-subscriber -[s16]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-nutritionorder -[s17]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-medicationrequest -[s18]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-coverage -[s19]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-practitioner -[s20]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-update -[s21]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claimresponse-base -[s22]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-encounter -[s23]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-base +[s2]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-subscription +[s3]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-devicerequest +[s4]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim +[s5]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-requestor +[s6]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary +[s7]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-practitionerrole +[s8]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claiminquiryresponse +[s9]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-communicationrequest +[s10]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-insurer +[s11]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-servicerequest +[s12]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-inquiry +[s13]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-task +[s14]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claimresponse +[s15]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-organization +[s16]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-subscriber +[s17]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-nutritionorder +[s18]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-medicationrequest +[s19]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-coverage +[s20]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-practitioner +[s21]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-update +[s22]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claimresponse-base +[s23]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-encounter +[s24]: http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-base diff --git a/davincipas/datatypes.bal b/davincipas/datatypes.bal index abbf73c0..e8e656b2 100644 --- a/davincipas/datatypes.bal +++ b/davincipas/datatypes.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -36,12 +36,23 @@ import ballerinax/health.fhir.r4; "system": { name: "system", dataType: r4:uri, - min: 0, + min: 1, max: 1, isArray: false, description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", path: "Identifier.system" }, + + "use": { + name: "use", + dataType: ProfileIdentifierUse, + min: 0, + max: 1, + isArray: false, + description: "The purpose of this identifier.", + path: "Identifier.use" + }, + "assigner": { name: "assigner", dataType: r4:Reference, @@ -51,15 +62,7 @@ import ballerinax/health.fhir.r4; description: "Organization that issued/manages the identifier.", path: "Identifier.assigner" }, - "ProfileIdentifierUse": { - name: "ProfileIdentifierUse", - dataType: ProfileIdentifierUse, - min: 0, - max: 1, - isArray: false, - description: "The purpose of this identifier.", - path: "Identifier.use" - }, + "'type": { name: "'type", dataType: r4:CodeableConcept, @@ -72,12 +75,14 @@ import ballerinax/health.fhir.r4; "value": { name: "value", dataType: string, - min: 0, + min: 1, max: 1, isArray: false, description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", path: "Identifier.value" - } }, + } + + }, serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer @@ -91,11 +96,11 @@ public type ProfileIdentifier record {| r4:Extension[] extension?; //Inherited child element from "Element" (Redefining to maintain order when serialize) (END) r4:Period period?; - r4:uri system?; + r4:uri system; + ProfileIdentifierUse use?; r4:Reference assigner?; - ProfileIdentifierUse ProfileIdentifierUse?; r4:CodeableConcept 'type?; - string value?; + string value; |}; public enum ProfileIdentifierUse { @@ -106,6 +111,86 @@ public enum ProfileIdentifierUse { CODE_PROFILEIDENTIFIERUSE_OFFICIAL = "official" }; +@r4:DataTypeDefinition { + name: "PASQuantity", + baseType: (), + elements: { + "comparator": { + name: "comparator", + dataType: ProfileQuantityComparator, + min: 0, + max: 0, + isArray: false, + description: "Not allowed to be used in this context", + path: "Quantity.comparator" + }, + + "unit": { + name: "unit", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "A human-readable form of the unit.", + path: "Quantity.unit" + }, + + "system": { + name: "system", + dataType: r4:uri, + min: 0, + max: 1, + isArray: false, + description: "The identification of the system that provides the coded form of the unit.", + path: "Quantity.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 0, + max: 1, + isArray: false, + description: "A computer processable form of the unit in some unit representation system.", + path: "Quantity.code" + }, + + "value": { + name: "value", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "The value of the measured amount. The value includes an implicit precision in the presentation of the value.", + path: "Quantity.value" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type ProfileQuantity record {| + *r4:Quantity; + + //Inherited child element from "Element" (Redefining to maintain order when serialize) (START) + string id?; + r4:Extension[] extension?; + //Inherited child element from "Element" (Redefining to maintain order when serialize) (END) + + string unit?; + r4:uri system?; + r4:code code?; + decimal value?; +|}; + +public enum ProfileQuantityComparator { + CODE_PROFILEQUANTITYCOMPARATOR_LESS_THAN_OR_EQUAL = "<=", + CODE_PROFILEQUANTITYCOMPARATOR_LESS_THAN = "<", + CODE_PROFILEQUANTITYCOMPARATOR_GREATER_THAN = ">", + CODE_PROFILEQUANTITYCOMPARATOR_GREATER_THAN_OR_EQUAL = ">=" +}; @r4:DataTypeDefinition { name: "PASTiming", @@ -184,23 +269,15 @@ public enum ProfileIdentifierUse { description: "A total count of the desired number of repetitions across the duration of the entire timing specification. If countMax is present, this element indicates the lower bound of the allowed range of count values.", path: "Timing.repeat.count" }, - "ProfileDatatypeTimingRepeatDayOfWeek": { - name: "ProfileDatatypeTimingRepeatDayOfWeek", - dataType: ProfileDatatypeTimingRepeatDayOfWeek, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "If one or more days of week is provided, then the action happens only on the specified day(s).", - path: "Timing.repeat.dayOfWeek" - }, - "ProfileDatatypeTimingRepeatDurationUnit": { - name: "ProfileDatatypeTimingRepeatDurationUnit", - dataType: ProfileDatatypeTimingRepeatDurationUnit, + + "periodUnit": { + name: "periodUnit", + dataType: ProfileDatatypeTimingRepeatPeriodUnit, min: 0, max: 1, isArray: false, - description: "The units of time for the duration, in UCUM units.", - path: "Timing.repeat.durationUnit" + description: "The units of time for the period in UCUM units.", + path: "Timing.repeat.periodUnit" }, "when": { name: "when", @@ -247,6 +324,17 @@ public enum ProfileIdentifierUse { description: "If present, indicates that the duration is a range - so to perform the action between [duration] and [durationMax] time length.", path: "Timing.repeat.durationMax" }, + + "dayOfWeek": { + name: "dayOfWeek", + dataType: ProfileDatatypeTimingRepeatDayOfWeek, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "If one or more days of week is provided, then the action happens only on the specified day(s).", + path: "Timing.repeat.dayOfWeek" + }, + "repeat": { name: "repeat", dataType: r4:ElementRepeat, @@ -256,6 +344,17 @@ public enum ProfileIdentifierUse { description: "A set of rules that describe when the event is scheduled.", path: "Timing.repeat" }, + + "durationUnit": { + name: "durationUnit", + dataType: ProfileDatatypeTimingRepeatDurationUnit, + min: 0, + max: 1, + isArray: false, + description: "The units of time for the duration, in UCUM units.", + path: "Timing.repeat.durationUnit" + }, + "event": { name: "event", dataType: r4:dateTime, @@ -265,15 +364,7 @@ public enum ProfileIdentifierUse { description: "Identifies specific times when the event occurs.", path: "Timing.event" }, - "ProfileDatatypeTimingRepeatPeriodUnit": { - name: "ProfileDatatypeTimingRepeatPeriodUnit", - dataType: ProfileDatatypeTimingRepeatPeriodUnit, - min: 0, - max: 1, - isArray: false, - description: "The units of time for the period in UCUM units.", - path: "Timing.repeat.periodUnit" - }, + "timeOfDay": { name: "timeOfDay", dataType: r4:time, @@ -282,7 +373,9 @@ public enum ProfileIdentifierUse { isArray: true, description: "Specified time of day for action to take place.", path: "Timing.repeat.timeOfDay" - } }, + } + + }, serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer @@ -303,16 +396,16 @@ public type ProfileDatatypeTiming record {| decimal periodMax?; r4:Extension[] modifierExtension?; r4:positiveInt count?; - ProfileDatatypeTimingRepeatDayOfWeek[] ProfileDatatypeTimingRepeatDayOfWeek?; - ProfileDatatypeTimingRepeatDurationUnit ProfileDatatypeTimingRepeatDurationUnit?; + ProfileDatatypeTimingRepeatPeriodUnit periodUnit?; r4:code[] when?; r4:positiveInt frequency?; r4:Duration boundsDuration?; decimal duration?; decimal durationMax?; + ProfileDatatypeTimingRepeatDayOfWeek[] dayOfWeek?; r4:ElementRepeat repeat?; + ProfileDatatypeTimingRepeatDurationUnit durationUnit?; r4:dateTime[] event?; - ProfileDatatypeTimingRepeatPeriodUnit ProfileDatatypeTimingRepeatPeriodUnit?; r4:time[] timeOfDay?; |}; diff --git a/davincipas/extensions.bal b/davincipas/extensions.bal new file mode 100644 index 00000000..e7fe795f --- /dev/null +++ b/davincipas/extensions.bal @@ -0,0 +1,2353 @@ +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). + +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +// AUTO-GENERATED FILE. +// This file is auto-generated by Ballerina. + +import ballerinax/health.fhir.r4; + +public type ExtensionItemAuthorizedDetailExtensions (ExtensionItemAuthorizedDetailEpsdtIndicator | ExtensionItemAuthorizedDetailRevenue | ExtensionItemAuthorizedDetailProductOrServiceCode | ExtensionItemAuthorizedDetailUnitPrice | ExtensionItemAuthorizedDetailModifier | ExtensionItemAuthorizedDetailAuthorizedService | ExtensionItemAuthorizedDetailNursingHomeLevelOfCare | ExtensionItemAuthorizedDetailQuantity | ExtensionItemAuthorizedDetailProductOrServiceCodeEnd | ExtensionItemAuthorizedDetailRevenueUnitRateLimit ); +public type ExtensionItemCertificationEffectiveDateExtensions (ExtensionItemCertificationEffectiveDateValuePeriod | ExtensionItemCertificationEffectiveDateValueDate ); +public type ExtensionReviewActionExtensions (ExtensionReviewActionCode | ExtensionReviewActionNumber | ExtensionReviewActionSecondSurgicalOpinionFlag | ExtensionReviewActionReasonCode ); +public type ExtensionHomeHealthCareInformationExtensions (ExtensionHomeHealthCareInformationDate | ExtensionHomeHealthCareInformationPrognosis ); +public type ExtensionConditionCodeExtensions (ExtensionConditionCodeCategory | ExtensionConditionCodeIndicator | ExtensionConditionCodeCode ); +public type ExtensionItemAuthorizedProviderExtensions (ExtensionItemAuthorizedProviderProvider | ExtensionItemAuthorizedProviderProviderType ); +public type ExtensionItemCertificationExpirationDateExtensions (ExtensionItemCertificationExpirationDateValuePeriod | ExtensionItemCertificationExpirationDateValueDate ); +public type ExtensionItemCertificationIssueDateExtensions (ExtensionItemCertificationIssueDateValueDate | ExtensionItemCertificationIssueDateValuePeriod ); + +@r4:DataTypeDefinition { + name: "ExtensionConditionCodeCategory", + baseType: (), + elements: { + "valueCodeableConcept": { + name: "valueCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "category.value[x]" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "category.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "category.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "category.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionConditionCodeCategory record {| + *r4:CodeableConceptExtension; + + r4:CodeableConcept valueCodeableConcept?; + string id?; + "category" url = "category"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionConditionCodeCode", + baseType: (), + elements: { + "valueCodeableConcept": { + name: "valueCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "code.value[x]" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "code.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "code.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "code.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionConditionCodeCode record {| + *r4:CodeableConceptExtension; + + r4:CodeableConcept valueCodeableConcept?; + string id?; + "code" url = "code"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionConditionCodeIndicator", + baseType: (), + elements: { + "valueBoolean": { + name: "valueBoolean", + dataType: boolean, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "indicator.value[x]" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "indicator.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "indicator.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "indicator.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionConditionCodeIndicator record {| + *r4:BooleanExtension; + + boolean valueBoolean?; + string id?; + "indicator" url = "indicator"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionHomeHealthCareInformationDate", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "date.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "date.id" + }, + + "valueDate": { + name: "valueDate", + dataType: r4:date, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "date.value[x]" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "date.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionHomeHealthCareInformationDate record {| + *r4:DateExtension; + + string id?; + r4:date valueDate?; + "date" url = "date"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionHomeHealthCareInformationPrognosis", + baseType: (), + elements: { + "valueCodeableConcept": { + name: "valueCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "prognosis.value[x]" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "prognosis.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "prognosis.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "prognosis.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionHomeHealthCareInformationPrognosis record {| + *r4:CodeableConceptExtension; + + r4:CodeableConcept valueCodeableConcept?; + string id?; + "prognosis" url = "prognosis"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailAuthorizedService", + baseType: (), + elements: { + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailAuthorizedService record {| + *r4:ExtensionExtension; + +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailEpsdtIndicator", + baseType: (), + elements: { + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailEpsdtIndicator record {| + *r4:ExtensionExtension; + +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailModifier", + baseType: (), + elements: { + "valueCodeableConcept": { + name: "valueCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "modifier.value[x]" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "modifier.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "modifier.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "modifier.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailModifier record {| + *r4:CodeableConceptExtension; + + r4:CodeableConcept valueCodeableConcept?; + string id?; + "modifier" url = "modifier"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailNursingHomeLevelOfCare", + baseType: (), + elements: { + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailNursingHomeLevelOfCare record {| + *r4:ExtensionExtension; + +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailProductOrServiceCode", + baseType: (), + elements: { + "valueCodeableConcept": { + name: "valueCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "productOrServiceCode.value[x]" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "productOrServiceCode.extension" + }, + + "productOrServiceCodeEnd": { + name: "productOrServiceCodeEnd", + dataType: r4:Extension, + min: 0, + max: 1, + isArray: true, + description: "Used to provide the last code in a series of codes for the service being requested.", + path: "productOrServiceCode.productOrServiceCodeEnd" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "productOrServiceCode.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "productOrServiceCode.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailProductOrServiceCode record {| + *r4:CodeableConceptExtension; + + r4:CodeableConcept valueCodeableConcept?; + r4:Extension[] productOrServiceCodeEnd?; + string id?; + "productOrServiceCode" url = "productOrServiceCode"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailProductOrServiceCodeEnd", + baseType: (), + elements: { + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailProductOrServiceCodeEnd record {| + *r4:ExtensionExtension; + +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailQuantity", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "quantity.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "quantity.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "quantity.url" + }, + + "valueQuantity": { + name: "valueQuantity", + dataType: r4:Quantity, + min: 0, + max: 1, + isArray: false, + description: "The comparator is not used on a SimpleQuantity", + path: "quantity.value[x]" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailQuantity record {| + *r4:QuantityExtension; + + string id?; + "quantity" url = "quantity"; + r4:Quantity valueQuantity?; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailRevenue", + baseType: (), + elements: { + "revenueUnitRateLimit": { + name: "revenueUnitRateLimit", + dataType: r4:Extension, + min: 0, + max: 1, + isArray: true, + description: "The limit on the rate per unit of revenue for hospital accomodation. (SV206)", + path: "revenue.revenueUnitRateLimit" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailRevenue record {| + *r4:ExtensionExtension; + + r4:Extension[] revenueUnitRateLimit?; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailRevenueUnitRateLimit", + baseType: (), + elements: { + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailRevenueUnitRateLimit record {| + *r4:ExtensionExtension; + +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetailUnitPrice", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "unitPrice.extension" + }, + + "valueMoney": { + name: "valueMoney", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "unitPrice.value[x]" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "unitPrice.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "unitPrice.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetailUnitPrice record {| + *r4:MoneyExtension; + + r4:Money valueMoney?; + string id?; + "unitPrice" url = "unitPrice"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedProviderProvider", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "provider.extension" + }, + + "valueReference": { + name: "valueReference", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "provider.value[x]" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "provider.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "provider.url" + }, + + "providerType": { + name: "providerType", + dataType: r4:Extension, + min: 0, + max: 1, + isArray: true, + description: "The type of provider who has been authorized to provide this item.", + path: "provider.providerType" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedProviderProvider record {| + *r4:ReferenceExtension; + + r4:Reference valueReference?; + string id?; + "provider" url = "provider"; + r4:Extension[] providerType?; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedProviderProviderType", + baseType: (), + elements: { + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedProviderProviderType record {| + *r4:ExtensionExtension; + +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemCertificationEffectiveDateValueDate", + baseType: (), + elements: { + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemCertificationEffectiveDateValueDate record {| + *r4:ExtensionExtension; + +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemCertificationEffectiveDateValuePeriod", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "valuePeriod.extension" + }, + + "end": { + name: "end", + dataType: r4:dateTime, + min: 0, + max: 1, + isArray: false, + description: "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", + path: "valuePeriod.end" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "valuePeriod.id" + }, + + "'start": { + name: "'start", + dataType: r4:dateTime, + min: 0, + max: 1, + isArray: false, + description: "The start of the period. The boundary is inclusive.", + path: "valuePeriod.start" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemCertificationEffectiveDateValuePeriod record {| + *r4:ExtensionExtension; + + r4:Extension[] extension?; + r4:dateTime end?; + string id?; + r4:dateTime 'start?; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemCertificationExpirationDateValueDate", + baseType: (), + elements: { + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemCertificationExpirationDateValueDate record {| + *r4:ExtensionExtension; + +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemCertificationExpirationDateValuePeriod", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "valuePeriod.extension" + }, + + "end": { + name: "end", + dataType: r4:dateTime, + min: 0, + max: 1, + isArray: false, + description: "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", + path: "valuePeriod.end" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "valuePeriod.id" + }, + + "'start": { + name: "'start", + dataType: r4:dateTime, + min: 0, + max: 1, + isArray: false, + description: "The start of the period. The boundary is inclusive.", + path: "valuePeriod.start" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemCertificationExpirationDateValuePeriod record {| + *r4:ExtensionExtension; + + r4:Extension[] extension?; + r4:dateTime end?; + string id?; + r4:dateTime 'start?; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemCertificationIssueDateValueDate", + baseType: (), + elements: { + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemCertificationIssueDateValueDate record {| + *r4:ExtensionExtension; + +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemCertificationIssueDateValuePeriod", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "valuePeriod.extension" + }, + + "end": { + name: "end", + dataType: r4:dateTime, + min: 0, + max: 1, + isArray: false, + description: "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", + path: "valuePeriod.end" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "valuePeriod.id" + }, + + "'start": { + name: "'start", + dataType: r4:dateTime, + min: 0, + max: 1, + isArray: false, + description: "The start of the period. The boundary is inclusive.", + path: "valuePeriod.start" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemCertificationIssueDateValuePeriod record {| + *r4:ExtensionExtension; + + r4:Extension[] extension?; + r4:dateTime end?; + string id?; + r4:dateTime 'start?; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionReviewActionNumber", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "number.extension" + }, + + "valueString": { + name: "valueString", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "number.value[x]" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "number.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "number.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionReviewActionNumber record {| + *r4:StringExtension; + + string valueString?; + string id?; + "number" url = "number"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionReviewActionReasonCode", + baseType: (), + elements: { + "valueCodeableConcept": { + name: "valueCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "reasonCode.value[x]" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "reasonCode.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "reasonCode.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "reasonCode.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionReviewActionReasonCode record {| + *r4:CodeableConceptExtension; + + r4:CodeableConcept valueCodeableConcept?; + string id?; + "reasonCode" url = "reasonCode"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionReviewActionSecondSurgicalOpinionFlag", + baseType: (), + elements: { + "valueBoolean": { + name: "valueBoolean", + dataType: boolean, + min: 0, + max: 1, + isArray: false, + description: "Value of extension - must be one of a constrained set of the data types (see [Extensibility](http://hl7.org/fhir/R4/extensibility.html) for a list).", + path: "secondSurgicalOpinionFlag.value[x]" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: 0, + isArray: true, + description: "An Extension", + path: "secondSurgicalOpinionFlag.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "secondSurgicalOpinionFlag.id" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "secondSurgicalOpinionFlag.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionReviewActionSecondSurgicalOpinionFlag record {| + *r4:BooleanExtension; + + boolean valueBoolean?; + string id?; + "secondSurgicalOpinionFlag" url = "secondSurgicalOpinionFlag"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionAdministrationReferenceNumber", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionAdministrationReferenceNumber record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-administrationReferenceNumber" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-administrationReferenceNumber"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionAuthorizationNumber", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionAuthorizationNumber record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-authorizationNumber" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-authorizationNumber"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionAuthorizedProviderType", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionAuthorizedProviderType record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-authorizedProviderType" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-authorizedProviderType"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionCareTeamClaimScope", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionCareTeamClaimScope record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-careTeamClaimScope"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionCertificationType", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionCertificationType record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-certificationType" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-certificationType"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionCommunicatedDiagnosis", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionCommunicatedDiagnosis record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-communicatedDiagnosis" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-communicatedDiagnosis"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionConditionCode", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 3, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "Extension.extension" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionConditionCode record {| + *r4:ExtensionExtension; + + r4:Extension[] extension; + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-conditionCode" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-conditionCode"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionContentModifier", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionContentModifier record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-contentModifier" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-contentModifier"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionDiagnosisRecordedDate", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionDiagnosisRecordedDate record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-diagnosisRecordedDate" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-diagnosisRecordedDate"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionEpsdtIndicator", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionEpsdtIndicator record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-epsdtIndicator" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-epsdtIndicator"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionErrorElement", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionErrorElement record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-errorElement" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-errorElement"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionErrorFollowupAction", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionErrorFollowupAction record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-errorFollowupAction" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-errorFollowupAction"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionErrorPath", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionErrorPath record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-errorPath" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-errorPath"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionHomeHealthCareInformation", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 2, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "Extension.extension" + }, + + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionHomeHealthCareInformation record {| + *r4:ExtensionExtension; + + r4:Extension[] extension; + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-homeHealthCareInformation" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-homeHealthCareInformation"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionIdentifierJurisdiction", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionIdentifierJurisdiction record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierJurisdiction" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierJurisdiction"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionIdentifierSubDepartment", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionIdentifierSubDepartment record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierSubDepartment" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-identifierSubDepartment"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionInfoChanged", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionInfoChanged record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-infoChanged" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-infoChanged"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedDetail", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedDetail record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemAuthorizedDetail" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemAuthorizedDetail"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemAuthorizedProvider", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemAuthorizedProvider record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemAuthorizedProvider" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemAuthorizedProvider"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemCertificationEffectiveDate", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemCertificationEffectiveDate record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemCertificationEffectiveDate" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemCertificationEffectiveDate"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemCertificationExpirationDate", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemCertificationExpirationDate record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemCertificationExpirationDate" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemCertificationExpirationDate"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemCertificationIssueDate", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemCertificationIssueDate record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemCertificationIssueDate" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemCertificationIssueDate"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemPreAuthIssueDate", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemPreAuthIssueDate record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemPreAuthIssueDate" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemPreAuthIssueDate"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemPreAuthPeriod", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemPreAuthPeriod record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemPreAuthPeriod" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemPreAuthPeriod"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemRequestedServiceDate", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemRequestedServiceDate record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemRequestedServiceDate" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemRequestedServiceDate"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionItemTraceNumber", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionItemTraceNumber record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemTraceNumber" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-itemTraceNumber"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionLevelOfServiceCode", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionLevelOfServiceCode record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-levelOfServiceCode" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-levelOfServiceCode"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionMilitaryStatus", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionMilitaryStatus record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-militaryStatus" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-militaryStatus"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionNursingHomeLevelOfCare", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionNursingHomeLevelOfCare record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeLevelOfCare" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeLevelOfCare"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionNursingHomeResidentialStatus", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionNursingHomeResidentialStatus record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeResidentialStatus" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-nursingHomeResidentialStatus"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionPaLineNumber", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionPaLineNumber record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-paLineNumber" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-paLineNumber"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionPatientStatus", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionPatientStatus record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-patientStatus" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-patientStatus"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionProductOrServiceCodeEnd", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionProductOrServiceCodeEnd record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-productOrServiceCodeEnd" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-productOrServiceCodeEnd"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionRequestedService", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionRequestedService record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-requestedService" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-requestedService"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionRevenueCode", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionRevenueCode record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-revenueCode" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-revenueCode"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionRevenueUnitRateLimit", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionRevenueUnitRateLimit record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-revenueUnitRateLimit" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-revenueUnitRateLimit"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionReviewAction", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionReviewAction record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-reviewAction" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-reviewAction"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionReviewActionCode", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionReviewActionCode record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-reviewActionCode" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-reviewActionCode"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionServiceItemRequestType", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionServiceItemRequestType record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-serviceItemRequestType" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-serviceItemRequestType"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionServiceLineNumber", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionServiceLineNumber record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-serviceLineNumber" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-serviceLineNumber"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionTimingcalendarpattern", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionTimingcalendarpattern record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-timingcalendarpattern" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-timingcalendarpattern"; +|}; + +@r4:DataTypeDefinition { + name: "ExtensionTimingdeliverypattern", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ExtensionTimingdeliverypattern record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-timingdeliverypattern" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/extension-timingdeliverypattern"; +|}; + +@r4:DataTypeDefinition { + name: "ModifierextensionInfoCancelled", + baseType: (), + elements: { + "url": { + name: "url", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "Source of the definition for the extension code - a logical name or a URL.", + path: "Extension.url" + } + + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type ModifierextensionInfoCancelled record {| + *r4:ExtensionExtension; + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/modifierextension-infoCancelled" url = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/modifierextension-infoCancelled"; +|}; + diff --git a/davincipas/initializer.bal b/davincipas/initializer.bal index 4672b241..8e62d737 100644 --- a/davincipas/initializer.bal +++ b/davincipas/initializer.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -15,12 +15,12 @@ // under the License. // AUTO-GENERATED FILE. -// This file is auto-generated by WSO2 Healthcare. +// This file is auto-generated by Ballerina. import ballerinax/health.fhir.r4; import ballerina/log; -const FHIR_IG = "davincipas"; +const FHIR_IG = "health_fhir_r4_davincipas"; # Initializer for the module # + return - returns error if error occurred @@ -33,8 +33,8 @@ function init() returns r4:FHIRError? { r4:Terminology terminology = check terminologyLoader.load(); readonly & r4:IGInfoRecord baseIgRecord = { - title: "davincipas", - name: "davincipas", + title: "health_fhir_r4_davincipas", + name: "health_fhir_r4_davincipas", terminology: terminology, profiles: { "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-location": { @@ -42,6 +42,13 @@ function init() returns r4:FHIRError? { resourceType: "Location", modelType: PASLocation }, + + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-subscription": { + url: "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-subscription", + resourceType: "Subscription", + modelType: PASSubscription + }, + "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-devicerequest": { url: "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-devicerequest", resourceType: "DeviceRequest", diff --git a/davincipas/resource_pasbeneficiary.bal b/davincipas/resource_pasbeneficiary.bal index 8b1af567..9660d2c0 100644 --- a/davincipas/resource_pasbeneficiary.bal +++ b/davincipas/resource_pasbeneficiary.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -23,23 +23,12 @@ import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASBENEFICIARY = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-beneficiary"; public const RESOURCE_NAME_PASBENEFICIARY = "Patient"; +public type PASBeneficiaryExtensions (r4:Extension | ExtensionMilitaryStatus ); + # FHIR PASBeneficiary resource record. # # + resourceType - The type of the resource describes # + extension - An Extension -# * extension Slicings -# 1) Extension: US Core ethnicity Extension -# - min = 0 -# - max = 1 -# -# 2) Extension: US Core Race Extension -# - min = 0 -# - max = 1 -# -# 3) Extension: Extension -# - min = 0 -# - max = 1 -# # + gender - Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + link - Link to another patient resource that concerns the same actual patient. @@ -52,6 +41,11 @@ public const RESOURCE_NAME_PASBENEFICIARY = "Patient"; # + text - A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. # + communication - A language which may be used to communicate with the patient about his or her health. # + identifier - An identifier for this patient. + # * identifier Slicings + # 1) PASBeneficiaryIdentifierMemberIdentifier: An identifier for this patient + # - min = 0 + # - max = 1 + # # + address - An address for the individual. # + multipleBirthBoolean - Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer). # + active - Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death. @@ -170,7 +164,7 @@ public const RESOURCE_NAME_PASBENEFICIARY = "Patient"; }, "identifier" : { name: "identifier", - dataType: r4:Identifier, + dataType: PASBeneficiaryIdentifier, min: 1, max: int:MAX_VALUE, isArray: true, @@ -305,9 +299,12 @@ public type PASBeneficiary record {| r4:Narrative text?; PASBeneficiaryCommunication[] communication?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Patient.identifier constraint. This field must be an array containing at least one item." + } } - r4:Identifier[] identifier; + PASBeneficiaryIdentifier [] identifier; PASBeneficiaryAddress[] address?; boolean multipleBirthBoolean?; boolean active?; @@ -319,7 +316,10 @@ public type PASBeneficiary record {| r4:Meta meta?; r4:integer multipleBirthInteger?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Patient.name constraint. This field must be an array containing at least one item." + } } PASBeneficiaryName[] name; r4:uri implicitRules?; @@ -347,6 +347,48 @@ public enum PASBeneficiaryTelecomUse { CODE_USE_HOME = "home" } +# FHIR PASBeneficiaryIdentifierType datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASBeneficiaryIdentifierType", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASBeneficiaryIdentifierTypeCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Patient.identifier.type.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASBeneficiaryIdentifierType record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Patient.identifier.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Patient.identifier.type.coding constraint. This field must be an array containing at most one item." + } + } + PASBeneficiaryIdentifierTypeCoding [] coding; +|}; + + # FHIR PASBeneficiaryLink datatype record. # # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. @@ -419,6 +461,176 @@ public type PASBeneficiaryLink record {| PASBeneficiaryLinkType 'type; |}; + +# PASBeneficiaryIdentifierUseOne enum +public enum PASBeneficiaryIdentifierUseOne { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + +# FHIR PASBeneficiaryIdentifierTypeCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASBeneficiaryIdentifierTypeCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Patient.identifier.type.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Patient.identifier.type.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASBeneficiaryIdentifierTypeCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/v2-0203"; + r4:code code = "MB"; +|}; + + +# FHIR PASBeneficiaryIdentifier datatype record. +# +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + period - Time period during which identifier is/was valid for use. +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. +# + use - The purpose of this identifier. +# + assigner - Organization that issued/manages the identifier. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. +# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. + +@r4:DataTypeDefinition { + name: "PASBeneficiaryIdentifier", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Patient.identifier.extension" + }, + + "period": { + name: "period", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "Time period during which identifier is/was valid for use.", + path: "Patient.identifier.period" + }, + + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Patient.identifier.system" + }, + + "use": { + name: "use", + dataType: PASBeneficiaryIdentifierUse, + min: 0, + max: 1, + isArray: false, + description: "The purpose of this identifier.", + path: "Patient.identifier.use" + }, + + "assigner": { + name: "assigner", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "Organization that issued/manages the identifier.", + path: "Patient.identifier.assigner" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Patient.identifier.id" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "Patient.identifier.type" + }, + + "value": { + name: "value", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", + path: "Patient.identifier.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASBeneficiaryIdentifier record {| + *r4:Identifier; + + r4:Extension [] extension?; + r4:Period period?; + r4:uri system; + PASBeneficiaryIdentifierUse use?; + r4:Reference assigner?; + string id?; + r4:CodeableConcept 'type?; + string value; +|}; + + # PASBeneficiaryContactGender enum public enum PASBeneficiaryContactGender { CODE_GENDER_OTHER = "other", @@ -445,6 +657,122 @@ public enum PASBeneficiaryNameUse { CODE_USE_ANONYMOUS = "anonymous" } +# FHIR PASBeneficiaryIdentifierMemberIdentifier datatype record. +# +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + period - Time period during which identifier is/was valid for use. +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. +# + use - The purpose of this identifier. +# + assigner - Organization that issued/manages the identifier. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. +# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. + +@r4:DataTypeDefinition { + name: "PASBeneficiaryIdentifierMemberIdentifier", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Patient.identifier.extension" + }, + + "period": { + name: "period", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "Time period during which identifier is/was valid for use.", + path: "Patient.identifier.period" + }, + + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Patient.identifier.system" + }, + + "use": { + name: "use", + dataType: PASBeneficiaryIdentifierUseOne, + min: 0, + max: 1, + isArray: false, + description: "The purpose of this identifier.", + path: "Patient.identifier.use" + }, + + "assigner": { + name: "assigner", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "Organization that issued/manages the identifier.", + path: "Patient.identifier.assigner" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Patient.identifier.id" + }, + + "type": { + name: "type", + dataType: PASBeneficiaryIdentifierType, + min: 1, + max: 1, + isArray: false, + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "Patient.identifier.type" + }, + + "value": { + name: "value", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", + path: "Patient.identifier.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASBeneficiaryIdentifierMemberIdentifier record {| + *PASBeneficiaryIdentifier; + + r4:Extension [] extension?; + r4:Period period?; + r4:uri system; + PASBeneficiaryIdentifierUseOne use?; + r4:Reference assigner?; + string id?; + PASBeneficiaryIdentifierType 'type; + string value; +|}; + + # PASBeneficiaryGender enum public enum PASBeneficiaryGender { CODE_GENDER_OTHER = "other", diff --git a/davincipas/resource_pasclaim.bal b/davincipas/resource_pasclaim.bal index 735aba3b..819584c9 100644 --- a/davincipas/resource_pasclaim.bal +++ b/davincipas/resource_pasclaim.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -23,28 +23,13 @@ import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASCLAIM = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim"; public const RESOURCE_NAME_PASCLAIM = "Claim"; +public type PASClaimExtensions (r4:Extension | ExtensionCertificationType | ExtensionConditionCode | ExtensionHomeHealthCareInformation | ExtensionItemCertificationEffectiveDate | ExtensionItemCertificationExpirationDate | ExtensionItemCertificationIssueDate | ExtensionLevelOfServiceCode ); + # FHIR PASClaim resource record. # # + resourceType - The type of the resource describes # + insurance - Financial instruments for reimbursement for the health care products and services specified on the claim. # + extension - An Extension -# * extension Slicings -# 1) Extension: Used to provide required information about home health care services. (CR6) -# - min = 0 -# - max = 1 -# -# 2) Extension: A code specifying the level of service being requested (UM06) -# - min = 0 -# - max = 1 -# -# 3) Extension: Information about a hospital claim being requested. -# - min = 0 -# - max = 1 -# -# 4) Extension: Used to indicate condition codes for various requests for service. -# - min = 0 -# - max = * -# # + use - A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + language - The base language in which the resource is written. @@ -192,7 +177,7 @@ public const RESOURCE_NAME_PASCLAIM = "Claim"; name: "related", dataType: PASClaimRelated, min: 0, - max: int:MAX_VALUE, + max: 0, isArray: true, path: "Claim.related" }, @@ -271,7 +256,7 @@ public const RESOURCE_NAME_PASCLAIM = "Claim"; }, "identifier": { name: "identifier", - dataType: ProfileIdentifier, + dataType: r4:Identifier, min: 1, max: 2, isArray: true, @@ -412,7 +397,10 @@ public type PASClaim record {| RESOURCE_NAME_PASCLAIM resourceType = RESOURCE_NAME_PASCLAIM; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.insurance constraint. This field must be an array containing at least one item." + } } PASClaimInsurance[] insurance; r4:Extension[] extension?; @@ -434,12 +422,21 @@ public type PASClaim record {| r4:Narrative text?; PASClaimCareTeam[] careTeam?; @constraint:Array { - minLength: 1, - maxLength: 2 + minLength: { + value: 1, + message: "Validation failed for $.Claim.identifier constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.identifier constraint. This field must be an array containing at most one item." + } } ProfileIdentifier[] identifier; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.item constraint. This field must be an array containing at least one item." + } } PASClaimItem[] item; r4:dateTime created; @@ -527,7 +524,7 @@ public type PASClaim record {| "timingPeriod": { name: "timingPeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -545,7 +542,7 @@ public type PASClaim record {| "timingDate": { name: "timingDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -619,9 +616,9 @@ public type PASClaimSupportingInfoPatientEvent record {| r4:Extension[] extension?; r4:CodeableConcept code?; r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:date timingDate?; r4:positiveInt sequence; r4:Attachment valueAttachment?; string valueString?; @@ -639,7 +636,6 @@ public type PASClaimSupportingInfoPatientEvent record {| # + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + responsible - The party who is billing and/or responsible for the claimed products or services. -# + careTeamClaimScope - A flag that indicates whether the care team applies to the entire claim or a single item. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. @r4:DataTypeDefinition { name: "PASClaimCareTeamItemClaimMember", @@ -708,15 +704,7 @@ public type PASClaimSupportingInfoPatientEvent record {| description: "The party who is billing and/or responsible for the claimed products or services.", path: "Claim.careTeam.responsible" }, - "careTeamClaimScope": { - name: "careTeamClaimScope", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A flag that indicates whether the care team applies to the entire claim or a single item.", - path: "Claim.careTeam.extension" - }, + "id": { name: "id", dataType: string, @@ -738,18 +726,20 @@ public type PASClaimCareTeamItemClaimMember record {| r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; r4:Reference provider; r4:Extension[] modifierExtension?; boolean responsible?; - @constraint:Array { - minLength: 1, - maxLength: 1 - } - r4:Extension[] careTeamClaimScope; string id?; |}; @@ -818,7 +808,14 @@ public type PASClaimSupportingInfoCategory record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimSupportingInfoCategoryCoding[] coding; |}; @@ -921,7 +918,14 @@ public type PASClaimCareTeam record {| r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; @@ -1135,7 +1139,14 @@ public type PASClaimSupportingInfoCategoryTwo record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimSupportingInfoCategoryCodingTwo[] coding; |}; @@ -1155,7 +1166,7 @@ public type PASClaimSupportingInfoCategoryTwo record {| # + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. # + net - The quantity times the unit price for an additional service or product or charge. # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + quantity - The number of repetitions of a service or product. +# + quantity - The comparator is not used on a SimpleQuantity # + programCode - Identifies the program under which this may be recovered. # + careTeamSequence - CareTeam members related to this service or product. # + encounter - The Encounters during which this Claim was created or to which the creation of this record is tightly associated. @@ -1174,7 +1185,7 @@ public type PASClaimSupportingInfoCategoryTwo record {| "extension": { name: "extension", dataType: r4:Extension, - min: 0, + min: 2, max: int:MAX_VALUE, isArray: true, description: "An Extension", @@ -1294,7 +1305,7 @@ public type PASClaimSupportingInfoCategoryTwo record {| min: 0, max: 1, isArray: false, - description: "The number of repetitions of a service or product.", + description: "The comparator is not used on a SimpleQuantity", path: "Claim.item.quantity" }, "programCode": { @@ -1405,7 +1416,17 @@ public type PASClaimSupportingInfoCategoryTwo record {| public type PASClaimItem record {| *r4:BackboneElement; - r4:Extension[] extension?; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.item.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.item.extension constraint. This field must be an array containing at most one item." + } + } + r4:Extension [] extension; r4:CodeableConcept[] modifier?; r4:Extension[] modifierExtension?; r4:CodeableConcept productOrService; @@ -1480,7 +1501,6 @@ public type PASClaimSupportingInfoCategoryCodingTwo record {| # + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + responsible - The party who is billing and/or responsible for the claimed products or services. -# + careTeamClaimScope - A flag that indicates whether the care team applies to the entire claim or a single item. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. @r4:DataTypeDefinition { name: "PASClaimCareTeamOverallClaimMember", @@ -1549,15 +1569,7 @@ public type PASClaimSupportingInfoCategoryCodingTwo record {| description: "The party who is billing and/or responsible for the claimed products or services.", path: "Claim.careTeam.responsible" }, - "careTeamClaimScope": { - name: "careTeamClaimScope", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A flag that indicates whether the care team applies to the entire claim or a single item.", - path: "Claim.careTeam.extension" - }, + "id": { name: "id", dataType: string, @@ -1579,18 +1591,20 @@ public type PASClaimCareTeamOverallClaimMember record {| r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; r4:Reference provider; r4:Extension[] modifierExtension?; boolean responsible?; - @constraint:Array { - minLength: 1, - maxLength: 1 - } - r4:Extension[] careTeamClaimScope; string id?; |}; @@ -1804,6 +1818,16 @@ public type PASClaimInsurance record {| string id?; |}; + +# PASClaimIdentifierUse enum +public enum PASClaimIdentifierUse { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + # FHIR PASClaimSupportingInfoDischargeDates datatype record. # # + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. @@ -1872,7 +1896,7 @@ public type PASClaimInsurance record {| "timingPeriod": { name: "timingPeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -1890,7 +1914,7 @@ public type PASClaimInsurance record {| "timingDate": { name: "timingDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -1964,9 +1988,9 @@ public type PASClaimSupportingInfoDischargeDates record {| r4:Extension[] extension?; r4:CodeableConcept code?; r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:date timingDate?; r4:positiveInt sequence; r4:Attachment valueAttachment?; string valueString?; @@ -2043,7 +2067,7 @@ public type PASClaimSupportingInfoDischargeDates record {| "timingPeriod": { name: "timingPeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -2061,7 +2085,7 @@ public type PASClaimSupportingInfoDischargeDates record {| "timingDate": { name: "timingDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -2135,9 +2159,9 @@ public type PASClaimSupportingInfoAdmissionDates record {| r4:Extension[] extension?; r4:CodeableConcept code?; r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:date timingDate?; r4:positiveInt sequence; r4:Attachment valueAttachment?; string valueString?; @@ -2218,7 +2242,7 @@ public enum PASClaimStatus { "valueReference": { name: "valueReference", dataType: r4:Reference, - min: 1, + min: 0, max: 1, isArray: false, description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", @@ -2274,7 +2298,7 @@ public type PASClaimSupportingInfoAdditionalInformation record {| r4:positiveInt sequence; r4:Extension[] extension?; r4:CodeableConcept code?; - r4:Reference valueReference; + r4:Reference valueReference?; r4:Period timingPeriod?; r4:Extension[] modifierExtension?; string id?; @@ -2307,7 +2331,14 @@ public type PASClaimSupportingInfoCategoryOne record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimSupportingInfoCategoryCodingOne[] coding; |}; @@ -2487,7 +2518,7 @@ public type PASClaimSupportingInfoCategoryCodingThree record {| "valueString": { name: "valueString", dataType: string, - min: 1, + min: 0, max: 1, isArray: false, description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", @@ -2543,7 +2574,7 @@ public type PASClaimSupportingInfoMessageText record {| r4:positiveInt sequence; r4:Extension[] extension?; r4:CodeableConcept code?; - string valueString; + string valueString?; r4:Period timingPeriod?; r4:Extension[] modifierExtension?; string id?; @@ -2623,14 +2654,14 @@ public type PASClaimSupportingInfoMessageText record {| dataType: r4:CodeableConcept, min: 0, max: 1, - isArray: false, + isArray: true, description: "When the condition was observed or the relative ranking.", path: "Claim.diagnosis.type" }, "diagnosisCodeableConcept": { name: "diagnosisCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, description: "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", @@ -2651,8 +2682,14 @@ public type PASClaimDiagnosis record {| r4:CodeableConcept packageCode?; r4:Extension[] modifierExtension?; string id?; - r4:CodeableConcept 'type?; - r4:CodeableConcept diagnosisCodeableConcept; + @constraint:Array { + maxLength: { + value: 1, + message: "Validation failed for $.Claim.diagnosis.type constraint. This field must be an array containing at most one item." + } + } + r4:CodeableConcept [] 'type?; + r4:CodeableConcept diagnosisCodeableConcept?; |}; # FHIR PASClaimProcedure datatype record. @@ -2700,7 +2737,7 @@ public type PASClaimDiagnosis record {| "procedureCodeableConcept": { name: "procedureCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", @@ -2718,7 +2755,7 @@ public type PASClaimDiagnosis record {| "procedureReference": { name: "procedureReference", dataType: r4:Reference, - min: 1, + min: 0, max: 1, isArray: false, description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", @@ -2763,9 +2800,9 @@ public type PASClaimProcedure record {| r4:dateTime date?; r4:positiveInt sequence; r4:Extension[] extension?; - r4:CodeableConcept procedureCodeableConcept; + r4:CodeableConcept procedureCodeableConcept?; r4:Extension[] modifierExtension?; - r4:Reference procedureReference; + r4:Reference procedureReference?; string id?; r4:Reference[] udi?; r4:CodeableConcept[] 'type?; @@ -2797,7 +2834,14 @@ public type PASClaimSupportingInfoCategoryThree record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimSupportingInfoCategoryCodingThree[] coding; |}; @@ -3342,7 +3386,14 @@ public type PASClaimSupportingInfoCategoryFour record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimSupportingInfoCategoryCodingFour[] coding; |}; diff --git a/davincipas/resource_pasclaim_base.bal b/davincipas/resource_pasclaim_base.bal index 925047ad..fd0f7304 100644 --- a/davincipas/resource_pasclaim_base.bal +++ b/davincipas/resource_pasclaim_base.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -23,24 +23,13 @@ import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASCLAIMBASE = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-base"; public const RESOURCE_NAME_PASCLAIMBASE = "Claim"; +public type PASClaimBaseExtensions (r4:Extension | ExtensionCertificationType | ExtensionConditionCode | ExtensionHomeHealthCareInformation | ExtensionItemCertificationEffectiveDate | ExtensionItemCertificationExpirationDate | ExtensionItemCertificationIssueDate | ExtensionLevelOfServiceCode ); + # FHIR PASClaimBase resource record. # # + resourceType - The type of the resource describes # + insurance - Financial instruments for reimbursement for the health care products and services specified on the claim. # + extension - An Extension -# * extension Slicings -# 1) Extension: Used to provide required information about home health care services. (CR6) -# - min = 0 -# - max = 1 -# -# 2) Extension: A code specifying the level of service being requested (UM06) -# - min = 0 -# - max = 1 -# -# 3) Extension: Used to indicate condition codes for various requests for service. -# - min = 0 -# - max = * -# # + use - A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + language - The base language in which the resource is written. @@ -259,16 +248,16 @@ public const RESOURCE_NAME_PASCLAIMBASE = "Claim"; }, "identifier" : { name: "identifier", - dataType: r4:Identifier, + dataType: PASClaimBaseIdentifier, min: 0, - max: 1, - isArray: false, + max: int:MAX_VALUE, + isArray: true, path: "Claim.identifier" }, "item" : { name: "item", dataType: PASClaimBaseItem, - min: 1, + min: 0, max: int:MAX_VALUE, isArray: true, path: "Claim.item" @@ -400,7 +389,10 @@ public type PASClaimBase record {| RESOURCE_NAME_PASCLAIMBASE resourceType = RESOURCE_NAME_PASCLAIMBASE; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.insurance constraint. This field must be an array containing at least one item." + } } PASClaimBaseInsurance[] insurance; r4:Extension[] extension?; @@ -421,11 +413,8 @@ public type PASClaimBase record {| string id?; r4:Narrative text?; PASClaimBaseCareTeam[] careTeam?; - ProfileIdentifier identifier?; - @constraint:Array { - minLength: 1 - } - PASClaimBaseItem[] item; + ProfileIdentifier [] identifier?; + PASClaimBaseItem [] item?; r4:dateTime created; PASClaimBaseDiagnosis[] diagnosis?; r4:Reference originalPrescription?; @@ -443,150 +432,6 @@ public type PASClaimBase record {| r4:Element ...; |}; -# FHIR PASClaimBaseDiagnosis datatype record. -# -# + sequence - A number to uniquely identify diagnosis entries. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + onAdmission - Indication of whether the diagnosis was present on admission to a facility. -# + packageCode - A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - When the condition was observed or the relative ranking. -# + diagnosisCodeableConcept - The nature of illness or problem in a coded form or as a reference to an external defined Condition. -@r4:DataTypeDefinition { - name: "PASClaimBaseDiagnosis", - baseType: (), - elements: { - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify diagnosis entries.", - path: "Claim.diagnosis.sequence" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.diagnosis.extension" - }, - "onAdmission": { - name: "onAdmission", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "Indication of whether the diagnosis was present on admission to a facility.", - path: "Claim.diagnosis.onAdmission" - }, - "packageCode": { - name: "packageCode", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.", - path: "Claim.diagnosis.packageCode" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.diagnosis.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.diagnosis.id" - }, - "type": { - name: "type", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "When the condition was observed or the relative ranking.", - path: "Claim.diagnosis.type" - }, - "diagnosisCodeableConcept": { - name: "diagnosisCodeableConcept", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", - path: "Claim.diagnosis.diagnosis[x]" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimBaseDiagnosis record {| - *r4:BackboneElement; - - r4:positiveInt sequence; - r4:Extension[] extension?; - r4:CodeableConcept onAdmission?; - r4:CodeableConcept packageCode?; - r4:Extension[] modifierExtension?; - string id?; - r4:CodeableConcept 'type?; - r4:CodeableConcept diagnosisCodeableConcept; -|}; - -# FHIR PASClaimBaseSupportingInfoCategoryCodingTwo datatype record. -# -# + system - The identification of the code system that defines the meaning of the symbol in the code. -# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). -@r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfoCategoryCodingTwo", - baseType: (), - elements: { - "system": { - name: "system", - dataType: r4:uri, - min: 1, - max: 1, - isArray: false, - description: "The identification of the code system that defines the meaning of the symbol in the code.", - path: "Claim.supportingInfo.category.coding.system" - }, - "code": { - name: "code", - dataType: r4:code, - min: 1, - max: 1, - isArray: false, - description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", - path: "Claim.supportingInfo.category.coding.code" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimBaseSupportingInfoCategoryCodingTwo record {| - *r4:Coding; - - r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; - r4:code code = "admissionDates"; -|}; - # FHIR PASClaimBaseInsurance datatype record. # # + coverage - Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system. @@ -714,88 +559,6 @@ public type PASClaimBaseInsurance record {| string id?; |}; -# FHIR PASClaimBaseAccident datatype record. -# -# + date - Date of an accident event related to the products and services contained in the claim. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + locationAddress - The physical location of the accident event. -# + 'type - The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers. -@r4:DataTypeDefinition { - name: "PASClaimBaseAccident", - baseType: (), - elements: { - "date": { - name: "date", - dataType: r4:date, - min: 1, - max: 1, - isArray: false, - description: "Date of an accident event related to the products and services contained in the claim.", - path: "Claim.accident.date" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.accident.extension" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.accident.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.accident.id" - }, - "locationAddress": { - name: "locationAddress", - dataType: r4:Address, - min: 0, - max: 1, - isArray: false, - description: "The physical location of the accident event.", - path: "Claim.accident.location[x]" - }, - "type": { - name: "type", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.", - path: "Claim.accident.type" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimBaseAccident record {| - *r4:BackboneElement; - - r4:date date; - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; - string id?; - r4:Address locationAddress?; - r4:CodeableConcept 'type?; -|}; # FHIR PASClaimBaseCareTeamOverallClaimMember datatype record. # @@ -806,7 +569,6 @@ public type PASClaimBaseAccident record {| # + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + responsible - The party who is billing and/or responsible for the claimed products or services. -# + careTeamClaimScope - A flag that indicates whether the care team applies to the entire claim or a single item. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. @r4:DataTypeDefinition { name: "PASClaimBaseCareTeamOverallClaimMember", @@ -875,15 +637,7 @@ public type PASClaimBaseAccident record {| description: "The party who is billing and/or responsible for the claimed products or services.", path: "Claim.careTeam.responsible" }, - "careTeamClaimScope": { - name: "careTeamClaimScope", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A flag that indicates whether the care team applies to the entire claim or a single item.", - path: "Claim.careTeam.extension" - }, + "id": { name: "id", dataType: string, @@ -905,132 +659,219 @@ public type PASClaimBaseCareTeamOverallClaimMember record {| r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; r4:Reference provider; r4:Extension[] modifierExtension?; boolean responsible?; - @constraint:Array { - minLength: 1, - maxLength: 1 - } - r4:Extension[] careTeamClaimScope; string id?; |}; -# FHIR PASClaimBaseItem datatype record. + +# FHIR PASClaimBaseSupportingInfoCategoryCodingOne datatype record. # -# + extension - An Extension -# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). +@r4:DataTypeDefinition { + name: "PASClaimBaseSupportingInfoCategoryCodingOne", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Claim.supportingInfo.category.coding.system" + }, + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Claim.supportingInfo.category.coding.code" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimBaseSupportingInfoCategoryCodingOne record {| + *r4:Coding; + + r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; + r4:code code = "dischargeDates"; +|}; + +# FHIR PASClaimBaseSupportingInfoCategoryOne datatype record. +# +# + coding - A reference to a code defined by a terminology system. +@r4:DataTypeDefinition { + name: "PASClaimBaseSupportingInfoCategoryOne", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASClaimBaseSupportingInfoCategoryCodingOne, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Claim.supportingInfo.category.coding" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimBaseSupportingInfoCategoryOne record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimBaseSupportingInfoCategoryCodingOne[] coding; +|}; + +# FHIR PASClaimBaseSupportingInfoAdmissionDates datatype record. +# +# + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + reason - Provides the reason in the situation where a reason code is required in addition to the content. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + code - System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought. +# + valueReference - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + timingPeriod - The date when or period to which this information refers. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. -# + servicedPeriod - The date or dates when the service or product was supplied, performed or completed. -# + informationSequence - Exceptions, special conditions and supporting information applicable for this service or product. -# + revenue - The type of revenue or cost center providing the product and/or service. -# + locationCodeableConcept - Where the product or service was provided. -# + diagnosisSequence - Diagnosis applicable for this service or product. +# + timingDate - The date when or period to which this information refers. +# + sequence - A number to uniquely identify supporting information entries. +# + valueAttachment - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + valueString - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. -# + net - The quantity times the unit price for an additional service or product or charge. -# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + quantity - The number of repetitions of a service or product. -# + programCode - Identifies the program under which this may be recovered. -# + careTeamSequence - CareTeam members related to this service or product. -# + encounter - The Encounters during which this Claim was created or to which the creation of this record is tightly associated. -# + sequence - A number to uniquely identify item entries. -# + bodySite - Physical service site on the patient (limb, tooth, etc.). -# + subSite - A region or surface of the bodySite, e.g. limb region or tooth surface(s). -# + detail - A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. -# + servicedDate - The date or dates when the service or product was supplied, performed or completed. -# + udi - Unique Device Identifiers associated with this line item. -# + category - Code to identify the general type of benefits under which products and services are provided. -# + procedureSequence - Procedures applicable for this service or product. +# + category - The general class of the information supplied: information; exception; accident, employment; onset, etc. +# + valueQuantity - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. @r4:DataTypeDefinition { - name: "PASClaimBaseItem", + name: "PASClaimBaseSupportingInfoAdmissionDates", baseType: (), elements: { - "extension": { - name: "extension", - dataType: r4:Extension, + "valueBoolean": { + name: "valueBoolean", + dataType: boolean, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "An Extension", - path: "Claim.item.extension" + max: 0, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" }, - "modifier": { - name: "modifier", + "reason": { + name: "reason", dataType: r4:CodeableConcept, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Item typification or modifiers codes to convey additional context for the product or service.", - path: "Claim.item.modifier" + max: 1, + isArray: false, + description: "Provides the reason in the situation where a reason code is required in addition to the content.", + path: "Claim.supportingInfo.reason" }, - "modifierExtension": { - name: "modifierExtension", + "extension": { + name: "extension", dataType: r4:Extension, min: 0, max: int:MAX_VALUE, isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.item.modifierExtension" + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.supportingInfo.extension" }, - "productOrService": { - name: "productOrService", + "code": { + name: "code", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, - description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - path: "Claim.item.productOrService" + description: "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", + path: "Claim.supportingInfo.code" }, - "servicedPeriod": { - name: "servicedPeriod", + "valueReference": { + name: "valueReference", + dataType: r4:Reference, + min: 0, + max: 0, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" + }, + "timingPeriod": { + name: "timingPeriod", dataType: r4:Period, min: 0, max: 1, isArray: false, - description: "The date or dates when the service or product was supplied, performed or completed.", - path: "Claim.item.serviced[x]" + description: "The date when or period to which this information refers.", + path: "Claim.supportingInfo.timing[x]" }, - "informationSequence": { - name: "informationSequence", - dataType: r4:positiveInt, + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, min: 0, max: int:MAX_VALUE, isArray: true, - description: "Exceptions, special conditions and supporting information applicable for this service or product.", - path: "Claim.item.informationSequence" + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.supportingInfo.modifierExtension" }, - "revenue": { - name: "revenue", - dataType: r4:CodeableConcept, + "timingDate": { + name: "timingDate", + dataType: r4:date, min: 0, max: 1, isArray: false, - description: "The type of revenue or cost center providing the product and/or service.", - path: "Claim.item.revenue" + description: "The date when or period to which this information refers.", + path: "Claim.supportingInfo.timing[x]" }, - "locationCodeableConcept": { - name: "locationCodeableConcept", - dataType: r4:CodeableConcept, - min: 0, + "sequence": { + name: "sequence", + dataType: r4:positiveInt, + min: 1, max: 1, isArray: false, - description: "Where the product or service was provided.", - path: "Claim.item.location[x]" + description: "A number to uniquely identify supporting information entries.", + path: "Claim.supportingInfo.sequence" }, - "diagnosisSequence": { - name: "diagnosisSequence", - dataType: r4:positiveInt, + "valueAttachment": { + name: "valueAttachment", + dataType: r4:Attachment, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Diagnosis applicable for this service or product.", - path: "Claim.item.diagnosisSequence" + max: 0, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" + }, + "valueString": { + name: "valueString", + dataType: string, + min: 0, + max: 0, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" }, "id": { name: "id", @@ -1039,70 +880,142 @@ public type PASClaimBaseCareTeamOverallClaimMember record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.item.id" + path: "Claim.supportingInfo.id" }, - "factor": { - name: "factor", - dataType: decimal, - min: 0, + "category": { + name: "category", + dataType: PASClaimBaseSupportingInfoCategoryTwo, + min: 1, max: 1, isArray: false, - description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - path: "Claim.item.factor" + description: "The general class of the information supplied: information; exception; accident, employment; onset, etc.", + path: "Claim.supportingInfo.category" }, - "net": { - name: "net", - dataType: r4:Money, + "valueQuantity": { + name: "valueQuantity", + dataType: r4:Quantity, min: 0, - max: 1, + max: 0, isArray: false, - description: "The quantity times the unit price for an additional service or product or charge.", - path: "Claim.item.net" - }, - "unitPrice": { - name: "unitPrice", - dataType: r4:Money, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimBaseSupportingInfoAdmissionDates record {| + *PASClaimBaseSupportingInfo; + + boolean valueBoolean?; + r4:CodeableConcept reason?; + r4:Extension[] extension?; + r4:CodeableConcept code?; + r4:Reference valueReference?; + r4:Period timingPeriod?; + r4:Extension[] modifierExtension?; + r4:date timingDate?; + r4:positiveInt sequence; + r4:Attachment valueAttachment?; + string valueString?; + string id?; + PASClaimBaseSupportingInfoCategoryTwo category; + r4:Quantity valueQuantity?; +|}; + +# FHIR PASClaimBaseSupportingInfo datatype record. +# +# + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + reason - Provides the reason in the situation where a reason code is required in addition to the content. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + code - System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought. +# + valueReference - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + timingPeriod - The date when or period to which this information refers. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + timingDate - The date when or period to which this information refers. +# + sequence - A number to uniquely identify supporting information entries. +# + valueAttachment - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + valueString - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - The general class of the information supplied: information; exception; accident, employment; onset, etc. +# + valueQuantity - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +@r4:DataTypeDefinition { + name: "PASClaimBaseSupportingInfo", + baseType: (), + elements: { + "valueBoolean": { + name: "valueBoolean", + dataType: boolean, min: 0, max: 1, isArray: false, - description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - path: "Claim.item.unitPrice" + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" }, - "quantity": { - name: "quantity", - dataType: r4:Quantity, + "reason": { + name: "reason", + dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "The number of repetitions of a service or product.", - path: "Claim.item.quantity" + description: "Provides the reason in the situation where a reason code is required in addition to the content.", + path: "Claim.supportingInfo.reason" }, - "programCode": { - name: "programCode", - dataType: r4:CodeableConcept, + "extension": { + name: "extension", + dataType: r4:Extension, min: 0, max: int:MAX_VALUE, isArray: true, - description: "Identifies the program under which this may be recovered.", - path: "Claim.item.programCode" + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.supportingInfo.extension" }, - "careTeamSequence": { - name: "careTeamSequence", - dataType: r4:positiveInt, + "code": { + name: "code", + dataType: r4:CodeableConcept, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "CareTeam members related to this service or product.", - path: "Claim.item.careTeamSequence" + max: 1, + isArray: false, + description: "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", + path: "Claim.supportingInfo.code" }, - "encounter": { - name: "encounter", + "valueReference": { + name: "valueReference", dataType: r4:Reference, min: 0, + max: 1, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" + }, + "timingPeriod": { + name: "timingPeriod", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "The date when or period to which this information refers.", + path: "Claim.supportingInfo.timing[x]" + }, + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, max: int:MAX_VALUE, isArray: true, - description: "The Encounters during which this Claim was created or to which the creation of this record is tightly associated.", - path: "Claim.item.encounter" + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.supportingInfo.modifierExtension" + }, + "timingDate": { + name: "timingDate", + dataType: r4:date, + min: 0, + max: 1, + isArray: false, + description: "The date when or period to which this information refers.", + path: "Claim.supportingInfo.timing[x]" }, "sequence": { name: "sequence", @@ -1110,71 +1023,53 @@ public type PASClaimBaseCareTeamOverallClaimMember record {| min: 1, max: 1, isArray: false, - description: "A number to uniquely identify item entries.", - path: "Claim.item.sequence" + description: "A number to uniquely identify supporting information entries.", + path: "Claim.supportingInfo.sequence" }, - "bodySite": { - name: "bodySite", - dataType: r4:CodeableConcept, + "valueAttachment": { + name: "valueAttachment", + dataType: r4:Attachment, min: 0, max: 1, isArray: false, - description: "Physical service site on the patient (limb, tooth, etc.).", - path: "Claim.item.bodySite" - }, - "subSite": { - name: "subSite", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", - path: "Claim.item.subSite" - }, - "detail": { - name: "detail", - dataType: PASClaimBaseItemDetail, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", - path: "Claim.item.detail" + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" }, - "servicedDate": { - name: "servicedDate", - dataType: r4:date, + "valueString": { + name: "valueString", + dataType: string, min: 0, max: 1, isArray: false, - description: "The date or dates when the service or product was supplied, performed or completed.", - path: "Claim.item.serviced[x]" + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" }, - "udi": { - name: "udi", - dataType: r4:Reference, + "id": { + name: "id", + dataType: string, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Unique Device Identifiers associated with this line item.", - path: "Claim.item.udi" + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.supportingInfo.id" }, "category": { name: "category", dataType: r4:CodeableConcept, - min: 0, + min: 1, max: 1, isArray: false, - description: "Code to identify the general type of benefits under which products and services are provided.", - path: "Claim.item.category" + description: "The general class of the information supplied: information; exception; accident, employment; onset, etc.", + path: "Claim.supportingInfo.category" }, - "procedureSequence": { - name: "procedureSequence", - dataType: r4:positiveInt, + "valueQuantity": { + name: "valueQuantity", + dataType: r4:Quantity, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Procedures applicable for this service or product.", - path: "Claim.item.procedureSequence" + max: 1, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" } }, serializers: { @@ -1182,245 +1077,48 @@ public type PASClaimBaseCareTeamOverallClaimMember record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimBaseItem record {| +public type PASClaimBaseSupportingInfo record {| *r4:BackboneElement; + boolean valueBoolean?; + r4:CodeableConcept reason?; r4:Extension[] extension?; - r4:CodeableConcept[] modifier?; + r4:CodeableConcept code?; + r4:Reference valueReference?; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:CodeableConcept productOrService; - r4:Period servicedPeriod?; - r4:positiveInt[] informationSequence?; - r4:CodeableConcept revenue?; - r4:CodeableConcept locationCodeableConcept?; - r4:positiveInt[] diagnosisSequence?; - string id?; - decimal factor?; - r4:Money net?; - r4:Money unitPrice?; - r4:Quantity quantity?; - r4:CodeableConcept[] programCode?; - r4:positiveInt[] careTeamSequence?; - r4:Reference[] encounter?; + r4:date timingDate?; r4:positiveInt sequence; - r4:CodeableConcept bodySite?; - r4:CodeableConcept[] subSite?; - PASClaimBaseItemDetail[] detail?; - r4:date servicedDate?; - r4:Reference[] udi?; - r4:CodeableConcept category?; - r4:positiveInt[] procedureSequence?; + r4:Attachment valueAttachment?; + string valueString?; + string id?; + r4:CodeableConcept category; + r4:Quantity valueQuantity?; |}; -# FHIR PASClaimBaseProcedure datatype record. +# FHIR PASClaimBaseSupportingInfoPatientEvent datatype record. # -# + date - Date and optionally time the procedure was performed. -# + sequence - A number to uniquely identify procedure entries. +# + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + reason - Provides the reason in the situation where a reason code is required in addition to the content. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + procedureCodeableConcept - The code or reference to a Procedure resource which identifies the clinical intervention performed. +# + code - System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought. +# + valueReference - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + timingPeriod - The date when or period to which this information refers. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + procedureReference - The code or reference to a Procedure resource which identifies the clinical intervention performed. +# + timingDate - The date when or period to which this information refers. +# + sequence - A number to uniquely identify supporting information entries. +# + valueAttachment - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + valueString - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + udi - Unique Device Identifiers associated with this line item. -# + 'type - When the condition was observed or the relative ranking. +# + category - The general class of the information supplied: information; exception; accident, employment; onset, etc. +# + valueQuantity - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. @r4:DataTypeDefinition { - name: "PASClaimBaseProcedure", + name: "PASClaimBaseSupportingInfoPatientEvent", baseType: (), elements: { - "date": { - name: "date", - dataType: r4:dateTime, - min: 0, - max: 1, - isArray: false, - description: "Date and optionally time the procedure was performed.", - path: "Claim.procedure.date" - }, - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify procedure entries.", - path: "Claim.procedure.sequence" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.procedure.extension" - }, - "procedureCodeableConcept": { - name: "procedureCodeableConcept", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", - path: "Claim.procedure.procedure[x]" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.procedure.modifierExtension" - }, - "procedureReference": { - name: "procedureReference", - dataType: r4:Reference, - min: 1, - max: 1, - isArray: false, - description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", - path: "Claim.procedure.procedure[x]" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.procedure.id" - }, - "udi": { - name: "udi", - dataType: r4:Reference, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Unique Device Identifiers associated with this line item.", - path: "Claim.procedure.udi" - }, - "type": { - name: "type", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "When the condition was observed or the relative ranking.", - path: "Claim.procedure.type" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimBaseProcedure record {| - *r4:BackboneElement; - - r4:dateTime date?; - r4:positiveInt sequence; - r4:Extension[] extension?; - r4:CodeableConcept procedureCodeableConcept; - r4:Extension[] modifierExtension?; - r4:Reference procedureReference; - string id?; - r4:Reference[] udi?; - r4:CodeableConcept[] 'type?; -|}; - -# FHIR PASClaimBaseSupportingInfoCategoryCodingOne datatype record. -# -# + system - The identification of the code system that defines the meaning of the symbol in the code. -# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). -@r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfoCategoryCodingOne", - baseType: (), - elements: { - "system": { - name: "system", - dataType: r4:uri, - min: 1, - max: 1, - isArray: false, - description: "The identification of the code system that defines the meaning of the symbol in the code.", - path: "Claim.supportingInfo.category.coding.system" - }, - "code": { - name: "code", - dataType: r4:code, - min: 1, - max: 1, - isArray: false, - description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", - path: "Claim.supportingInfo.category.coding.code" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimBaseSupportingInfoCategoryCodingOne record {| - *r4:Coding; - - r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; - r4:code code = "dischargeDates"; -|}; - -# FHIR PASClaimBaseSupportingInfoCategoryOne datatype record. -# -# + coding - A reference to a code defined by a terminology system. -@r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfoCategoryOne", - baseType: (), - elements: { - "coding": { - name: "coding", - dataType: PASClaimBaseSupportingInfoCategoryCodingOne, - min: 1, - max: int:MAX_VALUE, - isArray: true, - description: "A reference to a code defined by a terminology system.", - path: "Claim.supportingInfo.category.coding" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimBaseSupportingInfoCategoryOne record {| - *r4:CodeableConcept; - - @constraint:Array { - minLength: 1 - } - PASClaimBaseSupportingInfoCategoryCodingOne[] coding; -|}; - -# FHIR PASClaimBaseSupportingInfoAdmissionDates datatype record. -# -# + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + reason - Provides the reason in the situation where a reason code is required in addition to the content. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + code - System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought. -# + valueReference - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + timingPeriod - The date when or period to which this information refers. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + timingDate - The date when or period to which this information refers. -# + sequence - A number to uniquely identify supporting information entries. -# + valueAttachment - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + valueString - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + category - The general class of the information supplied: information; exception; accident, employment; onset, etc. -# + valueQuantity - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -@r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfoAdmissionDates", - baseType: (), - elements: { - "valueBoolean": { - name: "valueBoolean", - dataType: boolean, + "valueBoolean": { + name: "valueBoolean", + dataType: boolean, min: 0, max: 0, isArray: false, @@ -1466,7 +1164,7 @@ public type PASClaimBaseSupportingInfoCategoryOne record {| "timingPeriod": { name: "timingPeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -1484,7 +1182,7 @@ public type PASClaimBaseSupportingInfoCategoryOne record {| "timingDate": { name: "timingDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -1528,7 +1226,7 @@ public type PASClaimBaseSupportingInfoCategoryOne record {| }, "category": { name: "category", - dataType: PASClaimBaseSupportingInfoCategoryTwo, + dataType: PASClaimBaseSupportingInfoCategory, min: 1, max: 1, isArray: false, @@ -1550,7 +1248,7 @@ public type PASClaimBaseSupportingInfoCategoryOne record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimBaseSupportingInfoAdmissionDates record {| +public type PASClaimBaseSupportingInfoPatientEvent record {| *PASClaimBaseSupportingInfo; boolean valueBoolean?; @@ -1558,18 +1256,18 @@ public type PASClaimBaseSupportingInfoAdmissionDates record {| r4:Extension[] extension?; r4:CodeableConcept code?; r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:date timingDate?; r4:positiveInt sequence; r4:Attachment valueAttachment?; string valueString?; string id?; - PASClaimBaseSupportingInfoCategoryTwo category; + PASClaimBaseSupportingInfoCategory category; r4:Quantity valueQuantity?; |}; -# FHIR PASClaimBaseSupportingInfo datatype record. +# FHIR PASClaimBaseSupportingInfoDischargeDates datatype record. # # + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. # + reason - Provides the reason in the situation where a reason code is required in addition to the content. @@ -1586,14 +1284,14 @@ public type PASClaimBaseSupportingInfoAdmissionDates record {| # + category - The general class of the information supplied: information; exception; accident, employment; onset, etc. # + valueQuantity - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. @r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfo", + name: "PASClaimBaseSupportingInfoDischargeDates", baseType: (), elements: { "valueBoolean": { name: "valueBoolean", dataType: boolean, min: 0, - max: 1, + max: 0, isArray: false, description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", path: "Claim.supportingInfo.value[x]" @@ -1629,7 +1327,7 @@ public type PASClaimBaseSupportingInfoAdmissionDates record {| name: "valueReference", dataType: r4:Reference, min: 0, - max: 1, + max: 0, isArray: false, description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", path: "Claim.supportingInfo.value[x]" @@ -1674,7 +1372,7 @@ public type PASClaimBaseSupportingInfoAdmissionDates record {| name: "valueAttachment", dataType: r4:Attachment, min: 0, - max: 1, + max: 0, isArray: false, description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", path: "Claim.supportingInfo.value[x]" @@ -1683,7 +1381,7 @@ public type PASClaimBaseSupportingInfoAdmissionDates record {| name: "valueString", dataType: string, min: 0, - max: 1, + max: 0, isArray: false, description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", path: "Claim.supportingInfo.value[x]" @@ -1699,7 +1397,7 @@ public type PASClaimBaseSupportingInfoAdmissionDates record {| }, "category": { name: "category", - dataType: r4:CodeableConcept, + dataType: PASClaimBaseSupportingInfoCategoryOne, min: 1, max: 1, isArray: false, @@ -1710,7 +1408,7 @@ public type PASClaimBaseSupportingInfoAdmissionDates record {| name: "valueQuantity", dataType: r4:Quantity, min: 0, - max: 1, + max: 0, isArray: false, description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", path: "Claim.supportingInfo.value[x]" @@ -1721,8 +1419,8 @@ public type PASClaimBaseSupportingInfoAdmissionDates record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimBaseSupportingInfo record {| - *r4:BackboneElement; +public type PASClaimBaseSupportingInfoDischargeDates record {| + *PASClaimBaseSupportingInfo; boolean valueBoolean?; r4:CodeableConcept reason?; @@ -1736,47 +1434,116 @@ public type PASClaimBaseSupportingInfo record {| r4:Attachment valueAttachment?; string valueString?; string id?; - r4:CodeableConcept category; + PASClaimBaseSupportingInfoCategoryOne category; r4:Quantity valueQuantity?; |}; -# FHIR PASClaimBaseSupportingInfoPatientEvent datatype record. + +# FHIR PASClaimBaseSupportingInfoCategoryTwo datatype record. # -# + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + reason - Provides the reason in the situation where a reason code is required in addition to the content. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + code - System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought. -# + valueReference - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + timingPeriod - The date when or period to which this information refers. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + timingDate - The date when or period to which this information refers. -# + sequence - A number to uniquely identify supporting information entries. -# + valueAttachment - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + valueString - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + category - The general class of the information supplied: information; exception; accident, employment; onset, etc. -# + valueQuantity - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + coding - A reference to a code defined by a terminology system. @r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfoPatientEvent", + name: "PASClaimBaseSupportingInfoCategoryTwo", baseType: (), elements: { - "valueBoolean": { - name: "valueBoolean", - dataType: boolean, - min: 0, - max: 0, - isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" - }, - "reason": { - name: "reason", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "Provides the reason in the situation where a reason code is required in addition to the content.", - path: "Claim.supportingInfo.reason" + "coding": { + name: "coding", + dataType: PASClaimBaseSupportingInfoCategoryCodingTwo, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Claim.supportingInfo.category.coding" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimBaseSupportingInfoCategoryTwo record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimBaseSupportingInfoCategoryCodingTwo[] coding; +|}; + + +# FHIR PASClaimBaseSupportingInfoCategory datatype record. +# +# + coding - A reference to a code defined by a terminology system. +@r4:DataTypeDefinition { + name: "PASClaimBaseSupportingInfoCategory", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASClaimBaseSupportingInfoCategoryCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Claim.supportingInfo.category.coding" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimBaseSupportingInfoCategory record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimBaseSupportingInfoCategoryCoding[] coding; +|}; + +# FHIR PASClaimBaseItemDetailSubDetail datatype record. +# +# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + quantity - The number of repetitions of a service or product. +# + programCode - Identifies the program under which this may be recovered. +# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. +# + sequence - A number to uniquely identify item entries. +# + revenue - The type of revenue or cost center providing the product and/or service. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + udi - Unique Device Identifiers associated with this line item. +# + category - Code to identify the general type of benefits under which products and services are provided. +# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. +# + net - The quantity times the unit price for an additional service or product or charge. +@r4:DataTypeDefinition { + name: "PASClaimBaseItemDetailSubDetail", + baseType: (), + elements: { + "unitPrice": { + name: "unitPrice", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", + path: "Claim.item.detail.subDetail.unitPrice" }, "extension": { name: "extension", @@ -1785,34 +1552,34 @@ public type PASClaimBaseSupportingInfo record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.supportingInfo.extension" + path: "Claim.item.detail.subDetail.extension" }, - "code": { - name: "code", - dataType: r4:CodeableConcept, + "quantity": { + name: "quantity", + dataType: r4:Quantity, min: 0, max: 1, isArray: false, - description: "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", - path: "Claim.supportingInfo.code" + description: "The number of repetitions of a service or product.", + path: "Claim.item.detail.subDetail.quantity" }, - "valueReference": { - name: "valueReference", - dataType: r4:Reference, + "programCode": { + name: "programCode", + dataType: r4:CodeableConcept, min: 0, - max: 0, - isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" + max: int:MAX_VALUE, + isArray: true, + description: "Identifies the program under which this may be recovered.", + path: "Claim.item.detail.subDetail.programCode" }, - "timingPeriod": { - name: "timingPeriod", - dataType: r4:Period, - min: 1, - max: 1, - isArray: false, - description: "The date when or period to which this information refers.", - path: "Claim.supportingInfo.timing[x]" + "modifier": { + name: "modifier", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Item typification or modifiers codes to convey additional context for the product or service.", + path: "Claim.item.detail.subDetail.modifier" }, "modifierExtension": { name: "modifierExtension", @@ -1821,16 +1588,16 @@ public type PASClaimBaseSupportingInfo record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.supportingInfo.modifierExtension" + path: "Claim.item.detail.subDetail.modifierExtension" }, - "timingDate": { - name: "timingDate", - dataType: r4:date, + "productOrService": { + name: "productOrService", + dataType: r4:CodeableConcept, min: 1, max: 1, isArray: false, - description: "The date when or period to which this information refers.", - path: "Claim.supportingInfo.timing[x]" + description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", + path: "Claim.item.detail.subDetail.productOrService" }, "sequence": { name: "sequence", @@ -1838,26 +1605,17 @@ public type PASClaimBaseSupportingInfo record {| min: 1, max: 1, isArray: false, - description: "A number to uniquely identify supporting information entries.", - path: "Claim.supportingInfo.sequence" - }, - "valueAttachment": { - name: "valueAttachment", - dataType: r4:Attachment, - min: 0, - max: 0, - isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" + description: "A number to uniquely identify item entries.", + path: "Claim.item.detail.subDetail.sequence" }, - "valueString": { - name: "valueString", - dataType: string, + "revenue": { + name: "revenue", + dataType: r4:CodeableConcept, min: 0, - max: 0, + max: 1, isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" + description: "The type of revenue or cost center providing the product and/or service.", + path: "Claim.item.detail.subDetail.revenue" }, "id": { name: "id", @@ -1866,25 +1624,43 @@ public type PASClaimBaseSupportingInfo record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.supportingInfo.id" + path: "Claim.item.detail.subDetail.id" + }, + "udi": { + name: "udi", + dataType: r4:Reference, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Unique Device Identifiers associated with this line item.", + path: "Claim.item.detail.subDetail.udi" }, "category": { name: "category", - dataType: PASClaimBaseSupportingInfoCategory, - min: 1, + dataType: r4:CodeableConcept, + min: 0, max: 1, isArray: false, - description: "The general class of the information supplied: information; exception; accident, employment; onset, etc.", - path: "Claim.supportingInfo.category" + description: "Code to identify the general type of benefits under which products and services are provided.", + path: "Claim.item.detail.subDetail.category" }, - "valueQuantity": { - name: "valueQuantity", - dataType: r4:Quantity, + "factor": { + name: "factor", + dataType: decimal, min: 0, - max: 0, + max: 1, isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" + description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", + path: "Claim.item.detail.subDetail.factor" + }, + "net": { + name: "net", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "The quantity times the unit price for an additional service or product or charge.", + path: "Claim.item.detail.subDetail.net" } }, serializers: { @@ -1892,99 +1668,91 @@ public type PASClaimBaseSupportingInfo record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimBaseSupportingInfoPatientEvent record {| - *PASClaimBaseSupportingInfo; +public type PASClaimBaseItemDetailSubDetail record {| + *r4:BackboneElement; - boolean valueBoolean?; - r4:CodeableConcept reason?; + r4:Money unitPrice?; r4:Extension[] extension?; - r4:CodeableConcept code?; - r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Quantity quantity?; + r4:CodeableConcept[] programCode?; + r4:CodeableConcept[] modifier?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:CodeableConcept productOrService; r4:positiveInt sequence; - r4:Attachment valueAttachment?; - string valueString?; + r4:CodeableConcept revenue?; string id?; - PASClaimBaseSupportingInfoCategory category; - r4:Quantity valueQuantity?; + r4:Reference[] udi?; + r4:CodeableConcept category?; + decimal factor?; + r4:Money net?; |}; -# FHIR PASClaimBaseSupportingInfoDischargeDates datatype record. + +# FHIR PASClaimBaseCareTeam datatype record. # -# + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + reason - Provides the reason in the situation where a reason code is required in addition to the content. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + code - System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought. -# + valueReference - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + timingPeriod - The date when or period to which this information refers. +# + qualification - The qualification of the practitioner which is applicable for this service. +# + sequence - A number to uniquely identify care team entries. +# + extension - An Extension +# + role - The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team. +# + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + timingDate - The date when or period to which this information refers. -# + sequence - A number to uniquely identify supporting information entries. -# + valueAttachment - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + valueString - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + responsible - The party who is billing and/or responsible for the claimed products or services. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + category - The general class of the information supplied: information; exception; accident, employment; onset, etc. -# + valueQuantity - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. + @r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfoDischargeDates", + name: "PASClaimBaseCareTeam", baseType: (), elements: { - "valueBoolean": { - name: "valueBoolean", - dataType: boolean, - min: 0, - max: 0, - isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" - }, - "reason": { - name: "reason", + "qualification": { + name: "qualification", dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "Provides the reason in the situation where a reason code is required in addition to the content.", - path: "Claim.supportingInfo.reason" + description: "The qualification of the practitioner which is applicable for this service.", + path: "Claim.careTeam.qualification" + }, + + "sequence": { + name: "sequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely identify care team entries.", + path: "Claim.careTeam.sequence" }, + "extension": { name: "extension", dataType: r4:Extension, - min: 0, + min: 1, max: int:MAX_VALUE, isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.supportingInfo.extension" + description: "An Extension", + path: "Claim.careTeam.extension" }, - "code": { - name: "code", + + "role": { + name: "role", dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", - path: "Claim.supportingInfo.code" + description: "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", + path: "Claim.careTeam.role" }, - "valueReference": { - name: "valueReference", + + "provider": { + name: "provider", dataType: r4:Reference, - min: 0, - max: 0, - isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" - }, - "timingPeriod": { - name: "timingPeriod", - dataType: r4:Period, min: 1, max: 1, isArray: false, - description: "The date when or period to which this information refers.", - path: "Claim.supportingInfo.timing[x]" + description: "Member of the team who provided the product or service.", + path: "Claim.careTeam.provider" }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -1992,44 +1760,125 @@ public type PASClaimBaseSupportingInfoPatientEvent record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.supportingInfo.modifierExtension" + path: "Claim.careTeam.modifierExtension" }, - "timingDate": { - name: "timingDate", - dataType: r4:date, - min: 1, + + "responsible": { + name: "responsible", + dataType: boolean, + min: 0, max: 1, isArray: false, - description: "The date when or period to which this information refers.", - path: "Claim.supportingInfo.timing[x]" + description: "The party who is billing and/or responsible for the claimed products or services.", + path: "Claim.careTeam.responsible" }, - "sequence": { - name: "sequence", - dataType: r4:positiveInt, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.careTeam.id" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimBaseCareTeam record {| + *r4:BackboneElement; + + r4:CodeableConcept qualification?; + r4:positiveInt sequence; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } + } + r4:Extension [] extension; + r4:CodeableConcept role?; + r4:Reference provider; + r4:Extension [] modifierExtension?; + boolean responsible?; + string id?; +|}; + + +# FHIR PASClaimBaseIdentifier datatype record. +# +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + period - Time period during which identifier is/was valid for use. +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. +# + use - The purpose of this identifier. +# + assigner - Organization that issued/manages the identifier. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. +# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. + +@r4:DataTypeDefinition { + name: "PASClaimBaseIdentifier", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.identifier.extension" + }, + + "period": { + name: "period", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "Time period during which identifier is/was valid for use.", + path: "Claim.identifier.period" + }, + + "system": { + name: "system", + dataType: r4:uri, min: 1, max: 1, isArray: false, - description: "A number to uniquely identify supporting information entries.", - path: "Claim.supportingInfo.sequence" + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Claim.identifier.system" }, - "valueAttachment": { - name: "valueAttachment", - dataType: r4:Attachment, + + "use": { + name: "use", + dataType: PASClaimBaseIdentifierUse, min: 0, - max: 0, + max: 1, isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" + description: "The purpose of this identifier.", + path: "Claim.identifier.use" }, - "valueString": { - name: "valueString", - dataType: string, + + "assigner": { + name: "assigner", + dataType: r4:Reference, min: 0, - max: 0, + max: 1, isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" + description: "Organization that issued/manages the identifier.", + path: "Claim.identifier.assigner" }, + "id": { name: "id", dataType: string, @@ -2037,140 +1886,664 @@ public type PASClaimBaseSupportingInfoPatientEvent record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.supportingInfo.id" + path: "Claim.identifier.id" }, - "category": { - name: "category", - dataType: PASClaimBaseSupportingInfoCategoryOne, - min: 1, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 0, max: 1, isArray: false, - description: "The general class of the information supplied: information; exception; accident, employment; onset, etc.", - path: "Claim.supportingInfo.category" + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "Claim.identifier.type" }, - "valueQuantity": { - name: "valueQuantity", - dataType: r4:Quantity, - min: 0, - max: 0, + + "value": { + name: "value", + dataType: string, + min: 1, + max: 1, isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" + description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", + path: "Claim.identifier.value" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimBaseSupportingInfoDischargeDates record {| - *PASClaimBaseSupportingInfo; - boolean valueBoolean?; - r4:CodeableConcept reason?; - r4:Extension[] extension?; - r4:CodeableConcept code?; - r4:Reference valueReference?; - r4:Period timingPeriod; - r4:Extension[] modifierExtension?; - r4:date timingDate; - r4:positiveInt sequence; - r4:Attachment valueAttachment?; - string valueString?; +public type PASClaimBaseIdentifier record {| + *r4:Identifier; + + r4:Extension [] extension?; + r4:Period period?; + r4:uri system; + PASClaimBaseIdentifierUse use?; + r4:Reference assigner?; string id?; - PASClaimBaseSupportingInfoCategoryOne category; - r4:Quantity valueQuantity?; + r4:CodeableConcept 'type?; + string value; |}; -# FHIR PASClaimBaseSupportingInfoCategoryCoding datatype record. + +# FHIR PASClaimBaseDiagnosis datatype record. # -# + system - The identification of the code system that defines the meaning of the symbol in the code. -# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). +# + sequence - A number to uniquely identify diagnosis entries. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + onAdmission - Indication of whether the diagnosis was present on admission to a facility. +# + packageCode - A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - When the condition was observed or the relative ranking. +# + diagnosisCodeableConcept - The nature of illness or problem in a coded form or as a reference to an external defined Condition. + @r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfoCategoryCoding", + name: "PASClaimBaseDiagnosis", baseType: (), elements: { - "system": { - name: "system", - dataType: r4:uri, + "sequence": { + name: "sequence", + dataType: r4:positiveInt, min: 1, max: 1, isArray: false, - description: "The identification of the code system that defines the meaning of the symbol in the code.", - path: "Claim.supportingInfo.category.coding.system" + description: "A number to uniquely identify diagnosis entries.", + path: "Claim.diagnosis.sequence" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.diagnosis.extension" + }, + + "onAdmission": { + name: "onAdmission", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Indication of whether the diagnosis was present on admission to a facility.", + path: "Claim.diagnosis.onAdmission" + }, + + "packageCode": { + name: "packageCode", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.", + path: "Claim.diagnosis.packageCode" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.diagnosis.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.diagnosis.id" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: true, + description: "When the condition was observed or the relative ranking.", + path: "Claim.diagnosis.type" + }, + + "diagnosisCodeableConcept": { + name: "diagnosisCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", + path: "Claim.diagnosis.diagnosis[x]" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimBaseDiagnosis record {| + *r4:BackboneElement; + + r4:positiveInt sequence; + r4:Extension [] extension?; + r4:CodeableConcept onAdmission?; + r4:CodeableConcept packageCode?; + r4:Extension [] modifierExtension?; + string id?; + @constraint:Array { + maxLength: { + value: 1, + message: "Validation failed for $.Claim.diagnosis.type constraint. This field must be an array containing at most one item." + } + } + r4:CodeableConcept [] 'type?; + r4:CodeableConcept diagnosisCodeableConcept?; +|}; + + +# FHIR PASClaimBaseSupportingInfoCategoryCodingTwo datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASClaimBaseSupportingInfoCategoryCodingTwo", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Claim.supportingInfo.category.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Claim.supportingInfo.category.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimBaseSupportingInfoCategoryCodingTwo record {| + *r4:Coding; + + r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; + r4:code code = "admissionDates"; +|}; + + +# FHIR PASClaimBaseAccident datatype record. +# +# + date - Date of an accident event related to the products and services contained in the claim. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + locationAddress - The physical location of the accident event. +# + 'type - The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers. + +@r4:DataTypeDefinition { + name: "PASClaimBaseAccident", + baseType: (), + elements: { + "date": { + name: "date", + dataType: r4:date, + min: 1, + max: 1, + isArray: false, + description: "Date of an accident event related to the products and services contained in the claim.", + path: "Claim.accident.date" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.accident.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.accident.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.accident.id" + }, + + "locationAddress": { + name: "locationAddress", + dataType: r4:Address, + min: 0, + max: 1, + isArray: false, + description: "The physical location of the accident event.", + path: "Claim.accident.location[x]" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers.", + path: "Claim.accident.type" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimBaseAccident record {| + *r4:BackboneElement; + + r4:date date; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string id?; + r4:Address locationAddress?; + r4:CodeableConcept 'type?; +|}; + + +# FHIR PASClaimBaseItem datatype record. +# +# + extension - An Extension +# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. +# + servicedPeriod - The date or dates when the service or product was supplied, performed or completed. +# + informationSequence - Exceptions, special conditions and supporting information applicable for this service or product. +# + revenue - The type of revenue or cost center providing the product and/or service. +# + locationCodeableConcept - Where the product or service was provided. +# + diagnosisSequence - Diagnosis applicable for this service or product. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. +# + net - The quantity times the unit price for an additional service or product or charge. +# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. +# + quantity - The comparator is not used on a SimpleQuantity +# + programCode - Identifies the program under which this may be recovered. +# + careTeamSequence - CareTeam members related to this service or product. +# + encounter - The Encounters during which this Claim was created or to which the creation of this record is tightly associated. +# + sequence - A number to uniquely identify item entries. +# + bodySite - Physical service site on the patient (limb, tooth, etc.). +# + subSite - A region or surface of the bodySite, e.g. limb region or tooth surface(s). +# + detail - A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. +# + servicedDate - The date or dates when the service or product was supplied, performed or completed. +# + udi - Unique Device Identifiers associated with this line item. +# + category - Code to identify the general type of benefits under which products and services are provided. +# + procedureSequence - Procedures applicable for this service or product. + +@r4:DataTypeDefinition { + name: "PASClaimBaseItem", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "Claim.item.extension" + }, + + "modifier": { + name: "modifier", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Item typification or modifiers codes to convey additional context for the product or service.", + path: "Claim.item.modifier" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.item.modifierExtension" + }, + + "productOrService": { + name: "productOrService", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", + path: "Claim.item.productOrService" + }, + + "servicedPeriod": { + name: "servicedPeriod", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "The date or dates when the service or product was supplied, performed or completed.", + path: "Claim.item.serviced[x]" + }, + + "informationSequence": { + name: "informationSequence", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Exceptions, special conditions and supporting information applicable for this service or product.", + path: "Claim.item.informationSequence" + }, + + "revenue": { + name: "revenue", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "The type of revenue or cost center providing the product and/or service.", + path: "Claim.item.revenue" + }, + + "locationCodeableConcept": { + name: "locationCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Where the product or service was provided.", + path: "Claim.item.location[x]" + }, + + "diagnosisSequence": { + name: "diagnosisSequence", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Diagnosis applicable for this service or product.", + path: "Claim.item.diagnosisSequence" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.item.id" + }, + + "factor": { + name: "factor", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", + path: "Claim.item.factor" + }, + + "net": { + name: "net", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "The quantity times the unit price for an additional service or product or charge.", + path: "Claim.item.net" + }, + + "unitPrice": { + name: "unitPrice", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", + path: "Claim.item.unitPrice" + }, + + "quantity": { + name: "quantity", + dataType: r4:Quantity, + min: 0, + max: 1, + isArray: false, + description: "The comparator is not used on a SimpleQuantity", + path: "Claim.item.quantity" + }, + + "programCode": { + name: "programCode", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Identifies the program under which this may be recovered.", + path: "Claim.item.programCode" + }, + + "careTeamSequence": { + name: "careTeamSequence", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "CareTeam members related to this service or product.", + path: "Claim.item.careTeamSequence" + }, + + "encounter": { + name: "encounter", + dataType: r4:Reference, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The Encounters during which this Claim was created or to which the creation of this record is tightly associated.", + path: "Claim.item.encounter" + }, + + "sequence": { + name: "sequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely identify item entries.", + path: "Claim.item.sequence" + }, + + "bodySite": { + name: "bodySite", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Physical service site on the patient (limb, tooth, etc.).", + path: "Claim.item.bodySite" + }, + + "subSite": { + name: "subSite", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", + path: "Claim.item.subSite" + }, + + "detail": { + name: "detail", + dataType: PASClaimBaseItemDetail, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + path: "Claim.item.detail" }, - "code": { - name: "code", - dataType: r4:code, - min: 1, + + "servicedDate": { + name: "servicedDate", + dataType: r4:date, + min: 0, max: 1, isArray: false, - description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", - path: "Claim.supportingInfo.category.coding.code" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimBaseSupportingInfoCategoryCoding record {| - *r4:Coding; + description: "The date or dates when the service or product was supplied, performed or completed.", + path: "Claim.item.serviced[x]" + }, - r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; - r4:code code = "patientEvent"; -|}; + "udi": { + name: "udi", + dataType: r4:Reference, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Unique Device Identifiers associated with this line item.", + path: "Claim.item.udi" + }, -# PASClaimBaseStatus enum -public enum PASClaimBaseStatus { - CODE_STATUS_DRAFT = "draft", - CODE_STATUS_ACTIVE = "active", - CODE_STATUS_CANCELLED = "cancelled", - CODE_STATUS_ENTERED_IN_ERROR = "entered-in-error" -} + "category": { + name: "category", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Code to identify the general type of benefits under which products and services are provided.", + path: "Claim.item.category" + }, -# FHIR PASClaimBaseSupportingInfoCategoryTwo datatype record. -# -# + coding - A reference to a code defined by a terminology system. -@r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfoCategoryTwo", - baseType: (), - elements: { - "coding": { - name: "coding", - dataType: PASClaimBaseSupportingInfoCategoryCodingTwo, - min: 1, + "procedureSequence": { + name: "procedureSequence", + dataType: r4:positiveInt, + min: 0, max: int:MAX_VALUE, isArray: true, - description: "A reference to a code defined by a terminology system.", - path: "Claim.supportingInfo.category.coding" + description: "Procedures applicable for this service or product.", + path: "Claim.item.procedureSequence" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimBaseSupportingInfoCategoryTwo record {| - *r4:CodeableConcept; - @constraint:Array { - minLength: 1 - } - PASClaimBaseSupportingInfoCategoryCodingTwo[] coding; +public type PASClaimBaseItem record {| + *r4:BackboneElement; + + r4:Extension [] extension?; + r4:CodeableConcept [] modifier?; + r4:Extension [] modifierExtension?; + r4:CodeableConcept productOrService; + r4:Period servicedPeriod?; + r4:positiveInt [] informationSequence?; + r4:CodeableConcept revenue?; + r4:CodeableConcept locationCodeableConcept?; + r4:positiveInt [] diagnosisSequence?; + string id?; + decimal factor?; + r4:Money net?; + r4:Money unitPrice?; + r4:Quantity quantity?; + r4:CodeableConcept [] programCode?; + r4:positiveInt [] careTeamSequence?; + r4:Reference [] encounter?; + r4:positiveInt sequence; + r4:CodeableConcept bodySite?; + r4:CodeableConcept [] subSite?; + PASClaimBaseItemDetail [] detail?; + r4:date servicedDate?; + r4:Reference [] udi?; + r4:CodeableConcept category?; + r4:positiveInt [] procedureSequence?; |}; -# FHIR PASClaimBasePayee datatype record. + +# FHIR PASClaimBaseProcedure datatype record. # +# + date - Date and optionally time the procedure was performed. +# + sequence - A number to uniquely identify procedure entries. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + procedureCodeableConcept - The code or reference to a Procedure resource which identifies the clinical intervention performed. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + procedureReference - The code or reference to a Procedure resource which identifies the clinical intervention performed. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - Type of Party to be reimbursed: subscriber, provider, other. -# + party - Reference to the individual or organization to whom any payment will be made. +# + udi - Unique Device Identifiers associated with this line item. +# + 'type - When the condition was observed or the relative ranking. + @r4:DataTypeDefinition { - name: "PASClaimBasePayee", + name: "PASClaimBaseProcedure", baseType: (), elements: { + "date": { + name: "date", + dataType: r4:dateTime, + min: 0, + max: 1, + isArray: false, + description: "Date and optionally time the procedure was performed.", + path: "Claim.procedure.date" + }, + + "sequence": { + name: "sequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely identify procedure entries.", + path: "Claim.procedure.sequence" + }, + "extension": { name: "extension", dataType: r4:Extension, @@ -2178,8 +2551,19 @@ public type PASClaimBaseSupportingInfoCategoryTwo record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.payee.extension" + path: "Claim.procedure.extension" + }, + + "procedureCodeableConcept": { + name: "procedureCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", + path: "Claim.procedure.procedure[x]" }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -2187,8 +2571,19 @@ public type PASClaimBaseSupportingInfoCategoryTwo record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.payee.modifierExtension" + path: "Claim.procedure.modifierExtension" + }, + + "procedureReference": { + name: "procedureReference", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", + path: "Claim.procedure.procedure[x]" }, + "id": { name: "id", dataType: string, @@ -2196,102 +2591,124 @@ public type PASClaimBaseSupportingInfoCategoryTwo record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.payee.id" + path: "Claim.procedure.id" + }, + + "udi": { + name: "udi", + dataType: r4:Reference, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Unique Device Identifiers associated with this line item.", + path: "Claim.procedure.udi" }, + "type": { name: "type", dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "Type of Party to be reimbursed: subscriber, provider, other.", - path: "Claim.payee.type" - }, - "party": { - name: "party", - dataType: r4:Reference, min: 0, - max: 1, - isArray: false, - description: "Reference to the individual or organization to whom any payment will be made.", - path: "Claim.payee.party" + max: int:MAX_VALUE, + isArray: true, + description: "When the condition was observed or the relative ranking.", + path: "Claim.procedure.type" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimBasePayee record {| + +public type PASClaimBaseProcedure record {| *r4:BackboneElement; - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; + r4:dateTime date?; + r4:positiveInt sequence; + r4:Extension [] extension?; + r4:CodeableConcept procedureCodeableConcept?; + r4:Extension [] modifierExtension?; + r4:Reference procedureReference?; string id?; - r4:CodeableConcept 'type; - r4:Reference party?; + r4:Reference [] udi?; + r4:CodeableConcept [] 'type?; |}; -# FHIR PASClaimBaseSupportingInfoCategory datatype record. + +# FHIR PASClaimBaseSupportingInfoCategoryCoding datatype record. # -# + coding - A reference to a code defined by a terminology system. +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + @r4:DataTypeDefinition { - name: "PASClaimBaseSupportingInfoCategory", + name: "PASClaimBaseSupportingInfoCategoryCoding", baseType: (), elements: { - "coding": { - name: "coding", - dataType: PASClaimBaseSupportingInfoCategoryCoding, + "system": { + name: "system", + dataType: r4:uri, min: 1, - max: int:MAX_VALUE, - isArray: true, - description: "A reference to a code defined by a terminology system.", - path: "Claim.supportingInfo.category.coding" + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Claim.supportingInfo.category.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Claim.supportingInfo.category.coding.code" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimBaseSupportingInfoCategory record {| - *r4:CodeableConcept; - @constraint:Array { - minLength: 1 - } - PASClaimBaseSupportingInfoCategoryCoding[] coding; +public type PASClaimBaseSupportingInfoCategoryCoding record {| + *r4:Coding; + + r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; + r4:code code = "patientEvent"; |}; -# FHIR PASClaimBaseItemDetailSubDetail datatype record. + +# PASClaimBaseIdentifierUse enum +public enum PASClaimBaseIdentifierUse { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + +# PASClaimBaseStatus enum +public enum PASClaimBaseStatus { + CODE_STATUS_DRAFT = "draft", + CODE_STATUS_ACTIVE = "active", + CODE_STATUS_CANCELLED = "cancelled", + CODE_STATUS_ENTERED_IN_ERROR = "entered-in-error" +} + +# FHIR PASClaimBasePayee datatype record. # -# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + quantity - The number of repetitions of a service or product. -# + programCode - Identifies the program under which this may be recovered. -# + modifier - Item typification or modifiers codes to convey additional context for the product or service. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. -# + sequence - A number to uniquely identify item entries. -# + revenue - The type of revenue or cost center providing the product and/or service. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + udi - Unique Device Identifiers associated with this line item. -# + category - Code to identify the general type of benefits under which products and services are provided. -# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. -# + net - The quantity times the unit price for an additional service or product or charge. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - Type of Party to be reimbursed: subscriber, provider, other. +# + party - Reference to the individual or organization to whom any payment will be made. + @r4:DataTypeDefinition { - name: "PASClaimBaseItemDetailSubDetail", + name: "PASClaimBasePayee", baseType: (), elements: { - "unitPrice": { - name: "unitPrice", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - path: "Claim.item.detail.subDetail.unitPrice" - }, "extension": { name: "extension", dataType: r4:Extension, @@ -2299,35 +2716,9 @@ public type PASClaimBaseSupportingInfoCategory record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.item.detail.subDetail.extension" - }, - "quantity": { - name: "quantity", - dataType: r4:Quantity, - min: 0, - max: 1, - isArray: false, - description: "The number of repetitions of a service or product.", - path: "Claim.item.detail.subDetail.quantity" - }, - "programCode": { - name: "programCode", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Identifies the program under which this may be recovered.", - path: "Claim.item.detail.subDetail.programCode" - }, - "modifier": { - name: "modifier", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Item typification or modifiers codes to convey additional context for the product or service.", - path: "Claim.item.detail.subDetail.modifier" + path: "Claim.payee.extension" }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -2335,35 +2726,9 @@ public type PASClaimBaseSupportingInfoCategory record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.item.detail.subDetail.modifierExtension" - }, - "productOrService": { - name: "productOrService", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - path: "Claim.item.detail.subDetail.productOrService" - }, - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify item entries.", - path: "Claim.item.detail.subDetail.sequence" - }, - "revenue": { - name: "revenue", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "The type of revenue or cost center providing the product and/or service.", - path: "Claim.item.detail.subDetail.revenue" + path: "Claim.payee.modifierExtension" }, + "id": { name: "id", dataType: string, @@ -2371,69 +2736,47 @@ public type PASClaimBaseSupportingInfoCategory record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.item.detail.subDetail.id" - }, - "udi": { - name: "udi", - dataType: r4:Reference, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Unique Device Identifiers associated with this line item.", - path: "Claim.item.detail.subDetail.udi" + path: "Claim.payee.id" }, - "category": { - name: "category", + + "type": { + name: "type", dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "Code to identify the general type of benefits under which products and services are provided.", - path: "Claim.item.detail.subDetail.category" - }, - "factor": { - name: "factor", - dataType: decimal, - min: 0, + min: 1, max: 1, isArray: false, - description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - path: "Claim.item.detail.subDetail.factor" + description: "Type of Party to be reimbursed: subscriber, provider, other.", + path: "Claim.payee.type" }, - "net": { - name: "net", - dataType: r4:Money, + + "party": { + name: "party", + dataType: r4:Reference, min: 0, max: 1, isArray: false, - description: "The quantity times the unit price for an additional service or product or charge.", - path: "Claim.item.detail.subDetail.net" + description: "Reference to the individual or organization to whom any payment will be made.", + path: "Claim.payee.party" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimBaseItemDetailSubDetail record {| + +public type PASClaimBasePayee record {| *r4:BackboneElement; - r4:Money unitPrice?; - r4:Extension[] extension?; - r4:Quantity quantity?; - r4:CodeableConcept[] programCode?; - r4:CodeableConcept[] modifier?; - r4:Extension[] modifierExtension?; - r4:CodeableConcept productOrService; - r4:positiveInt sequence; - r4:CodeableConcept revenue?; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; string id?; - r4:Reference[] udi?; - r4:CodeableConcept category?; - decimal factor?; - r4:Money net?; + r4:CodeableConcept 'type; + r4:Reference party?; |}; + # FHIR PASClaimBaseItemDetail datatype record. # # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. @@ -2699,113 +3042,6 @@ public type PASClaimBaseRelated record {| r4:CodeableConcept relationship?; |}; -# FHIR PASClaimBaseCareTeam datatype record. -# -# + qualification - The qualification of the practitioner which is applicable for this service. -# + sequence - A number to uniquely identify care team entries. -# + extension - An Extension -# + role - The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team. -# + provider - Member of the team who provided the product or service. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + responsible - The party who is billing and/or responsible for the claimed products or services. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -@r4:DataTypeDefinition { - name: "PASClaimBaseCareTeam", - baseType: (), - elements: { - "qualification": { - name: "qualification", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "The qualification of the practitioner which is applicable for this service.", - path: "Claim.careTeam.qualification" - }, - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify care team entries.", - path: "Claim.careTeam.sequence" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 1, - max: int:MAX_VALUE, - isArray: true, - description: "An Extension", - path: "Claim.careTeam.extension" - }, - "role": { - name: "role", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", - path: "Claim.careTeam.role" - }, - "provider": { - name: "provider", - dataType: r4:Reference, - min: 1, - max: 1, - isArray: false, - description: "Member of the team who provided the product or service.", - path: "Claim.careTeam.provider" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.careTeam.modifierExtension" - }, - "responsible": { - name: "responsible", - dataType: boolean, - min: 0, - max: 1, - isArray: false, - description: "The party who is billing and/or responsible for the claimed products or services.", - path: "Claim.careTeam.responsible" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.careTeam.id" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimBaseCareTeam record {| - *r4:BackboneElement; - - r4:CodeableConcept qualification?; - r4:positiveInt sequence; - @constraint:Array { - minLength: 1 - } - r4:Extension[] extension; - r4:CodeableConcept role?; - r4:Reference provider; - r4:Extension[] modifierExtension?; - boolean responsible?; - string id?; -|}; # PASClaimBaseUse enum public enum PASClaimBaseUse { @@ -2823,7 +3059,6 @@ public enum PASClaimBaseUse { # + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + responsible - The party who is billing and/or responsible for the claimed products or services. -# + careTeamClaimScope - A flag that indicates whether the care team applies to the entire claim or a single item. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. @r4:DataTypeDefinition { name: "PASClaimBaseCareTeamItemClaimMember", @@ -2892,15 +3127,7 @@ public enum PASClaimBaseUse { description: "The party who is billing and/or responsible for the claimed products or services.", path: "Claim.careTeam.responsible" }, - "careTeamClaimScope": { - name: "careTeamClaimScope", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A flag that indicates whether the care team applies to the entire claim or a single item.", - path: "Claim.careTeam.extension" - }, + "id": { name: "id", dataType: string, @@ -2922,18 +3149,20 @@ public type PASClaimBaseCareTeamItemClaimMember record {| r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; r4:Reference provider; r4:Extension[] modifierExtension?; boolean responsible?; - @constraint:Array { - minLength: 1, - maxLength: 1 - } - r4:Extension[] careTeamClaimScope; string id?; |}; diff --git a/davincipas/resource_pasclaim_inquiry.bal b/davincipas/resource_pasclaim_inquiry.bal index d3d63b72..2e997e01 100644 --- a/davincipas/resource_pasclaim_inquiry.bal +++ b/davincipas/resource_pasclaim_inquiry.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -23,28 +23,13 @@ import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASCLAIMINQUIRY = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-inquiry"; public const RESOURCE_NAME_PASCLAIMINQUIRY = "Claim"; +public type PASClaimInquiryExtensions (r4:Extension | ExtensionCertificationType | ExtensionConditionCode | ExtensionHomeHealthCareInformation | ExtensionItemCertificationEffectiveDate | ExtensionItemCertificationExpirationDate | ExtensionItemCertificationIssueDate | ExtensionLevelOfServiceCode ); + # FHIR PASClaimInquiry resource record. # # + resourceType - The type of the resource describes # + insurance - Financial instruments for reimbursement for the health care products and services specified on the claim. # + extension - An Extension -# * extension Slicings -# 1) Extension: Used to provide required information about home health care services. (CR6) -# - min = 0 -# - max = 1 -# -# 2) Extension: A code specifying the level of service being requested (UM06) -# - min = 0 -# - max = 1 -# -# 3) Extension: A code representing the type of certification being requested (UM02) -# - min = 0 -# - max = 1 -# -# 4) Extension: Used to indicate condition codes for various requests for service. -# - min = 0 -# - max = * -# # + use - A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + language - The base language in which the resource is written. @@ -264,15 +249,15 @@ public const RESOURCE_NAME_PASCLAIMINQUIRY = "Claim"; "identifier" : { name: "identifier", dataType: r4:Identifier, - min: 0, + min: 1, max: 1, - isArray: false, + isArray: true, path: "Claim.identifier" }, "item" : { name: "item", dataType: PASClaimInquiryItem, - min: 1, + min: 0, max: int:MAX_VALUE, isArray: true, path: "Claim.item" @@ -404,7 +389,10 @@ public type PASClaimInquiry record {| RESOURCE_NAME_PASCLAIMINQUIRY resourceType = RESOURCE_NAME_PASCLAIMINQUIRY; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.insurance constraint. This field must be an array containing at least one item." + } } PASClaimInquiryInsurance[] insurance; r4:Extension[] extension?; @@ -425,11 +413,18 @@ public type PASClaimInquiry record {| string id?; r4:Narrative text?; PASClaimInquiryCareTeam[] careTeam?; - ProfileIdentifier identifier?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.identifier constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.identifier constraint. This field must be an array containing at most one item." + } } - PASClaimInquiryItem[] item; + ProfileIdentifier [] identifier; + PASClaimInquiryItem [] item?; r4:dateTime created; PASClaimInquiryDiagnosis[] diagnosis?; r4:Reference originalPrescription?; @@ -618,13 +613,6 @@ public type PASClaimInquirySupportingInfo record {| r4:Quantity valueQuantity?; |}; -# PASClaimInquiryStatus enum -public enum PASClaimInquiryStatus { - CODE_STATUS_DRAFT = "draft", - CODE_STATUS_ACTIVE = "active", - CODE_STATUS_CANCELLED = "cancelled", - CODE_STATUS_ENTERED_IN_ERROR = "entered-in-error" -} # FHIR PASClaimInquirySupportingInfoAdmissionDates datatype record. # @@ -694,7 +682,7 @@ public enum PASClaimInquiryStatus { "timingPeriod": { name: "timingPeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -712,7 +700,7 @@ public enum PASClaimInquiryStatus { "timingDate": { name: "timingDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -786,9 +774,9 @@ public type PASClaimInquirySupportingInfoAdmissionDates record {| r4:Extension[] extension?; r4:CodeableConcept code?; r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:date timingDate?; r4:positiveInt sequence; r4:Attachment valueAttachment?; string valueString?; @@ -797,71 +785,65 @@ public type PASClaimInquirySupportingInfoAdmissionDates record {| r4:Quantity valueQuantity?; |}; -# FHIR PASClaimInquiryItemDetail datatype record. + +# FHIR PASClaimInquiryCareTeamOverallClaimMember datatype record. # -# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + quantity - The number of repetitions of a service or product. -# + programCode - Identifies the program under which this may be recovered. -# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + qualification - The qualification of the practitioner which is applicable for this service. +# + sequence - A number to uniquely identify care team entries. +# + extension - An Extension +# + role - The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team. +# + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + subDetail - A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. -# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. -# + sequence - A number to uniquely identify item entries. -# + revenue - The type of revenue or cost center providing the product and/or service. +# + responsible - The party who is billing and/or responsible for the claimed products or services. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + udi - Unique Device Identifiers associated with this line item. -# + category - Code to identify the general type of benefits under which products and services are provided. -# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. -# + net - The quantity times the unit price for an additional service or product or charge. @r4:DataTypeDefinition { - name: "PASClaimInquiryItemDetail", + name: "PASClaimInquiryCareTeamOverallClaimMember", baseType: (), elements: { - "unitPrice": { - name: "unitPrice", - dataType: r4:Money, + "qualification": { + name: "qualification", + dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - path: "Claim.item.detail.unitPrice" + description: "The qualification of the practitioner which is applicable for this service.", + path: "Claim.careTeam.qualification" + }, + "sequence": { + name: "sequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely identify care team entries.", + path: "Claim.careTeam.sequence" }, "extension": { name: "extension", dataType: r4:Extension, - min: 0, + min: 1, max: int:MAX_VALUE, isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.item.detail.extension" + description: "An Extension", + path: "Claim.careTeam.extension" }, - "quantity": { - name: "quantity", - dataType: r4:Quantity, + "role": { + name: "role", + dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "The number of repetitions of a service or product.", - path: "Claim.item.detail.quantity" - }, - "programCode": { - name: "programCode", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Identifies the program under which this may be recovered.", - path: "Claim.item.detail.programCode" + description: "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", + path: "Claim.careTeam.role" }, - "modifier": { - name: "modifier", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Item typification or modifiers codes to convey additional context for the product or service.", - path: "Claim.item.detail.modifier" + "provider": { + name: "provider", + dataType: r4:Reference, + min: 1, + max: 1, + isArray: false, + description: "Member of the team who provided the product or service.", + path: "Claim.careTeam.provider" }, "modifierExtension": { name: "modifierExtension", @@ -870,44 +852,18 @@ public type PASClaimInquirySupportingInfoAdmissionDates record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.item.detail.modifierExtension" - }, - "subDetail": { - name: "subDetail", - dataType: PASClaimInquiryItemDetailSubDetail, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", - path: "Claim.item.detail.subDetail" - }, - "productOrService": { - name: "productOrService", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - path: "Claim.item.detail.productOrService" - }, - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify item entries.", - path: "Claim.item.detail.sequence" + path: "Claim.careTeam.modifierExtension" }, - "revenue": { - name: "revenue", - dataType: r4:CodeableConcept, + "responsible": { + name: "responsible", + dataType: boolean, min: 0, max: 1, isArray: false, - description: "The type of revenue or cost center providing the product and/or service.", - path: "Claim.item.detail.revenue" + description: "The party who is billing and/or responsible for the claimed products or services.", + path: "Claim.careTeam.responsible" }, + "id": { name: "id", dataType: string, @@ -915,43 +871,7 @@ public type PASClaimInquirySupportingInfoAdmissionDates record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.item.detail.id" - }, - "udi": { - name: "udi", - dataType: r4:Reference, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Unique Device Identifiers associated with this line item.", - path: "Claim.item.detail.udi" - }, - "category": { - name: "category", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "Code to identify the general type of benefits under which products and services are provided.", - path: "Claim.item.detail.category" - }, - "factor": { - name: "factor", - dataType: decimal, - min: 0, - max: 1, - isArray: false, - description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - path: "Claim.item.detail.factor" - }, - "net": { - name: "net", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "The quantity times the unit price for an additional service or product or charge.", - path: "Claim.item.detail.net" + path: "Claim.careTeam.id" } }, serializers: { @@ -959,27 +879,31 @@ public type PASClaimInquirySupportingInfoAdmissionDates record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquiryItemDetail record {| - *r4:BackboneElement; +public type PASClaimInquiryCareTeamOverallClaimMember record {| + *PASClaimInquiryCareTeam; - r4:Money unitPrice?; - r4:Extension[] extension?; - r4:Quantity quantity?; - r4:CodeableConcept[] programCode?; - r4:CodeableConcept[] modifier?; - r4:Extension[] modifierExtension?; - PASClaimInquiryItemDetailSubDetail[] subDetail?; - r4:CodeableConcept productOrService; + r4:CodeableConcept qualification?; r4:positiveInt sequence; - r4:CodeableConcept revenue?; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } + } + r4:Extension[] extension; + r4:CodeableConcept role?; + r4:Reference provider; + r4:Extension[] modifierExtension?; + boolean responsible?; string id?; - r4:Reference[] udi?; - r4:CodeableConcept category?; - decimal factor?; - r4:Money net?; |}; -# FHIR PASClaimInquiryCareTeamOverallClaimMember datatype record. + +# FHIR PASClaimInquiryCareTeam datatype record. # # + qualification - The qualification of the practitioner which is applicable for this service. # + sequence - A number to uniquely identify care team entries. @@ -988,10 +912,9 @@ public type PASClaimInquiryItemDetail record {| # + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + responsible - The party who is billing and/or responsible for the claimed products or services. -# + careTeamClaimScope - A flag that indicates whether the care team applies to the entire claim or a single item. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. @r4:DataTypeDefinition { - name: "PASClaimInquiryCareTeamOverallClaimMember", + name: "PASClaimInquiryCareTeam", baseType: (), elements: { "qualification": { @@ -1057,15 +980,6 @@ public type PASClaimInquiryItemDetail record {| description: "The party who is billing and/or responsible for the claimed products or services.", path: "Claim.careTeam.responsible" }, - "careTeamClaimScope": { - name: "careTeamClaimScope", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A flag that indicates whether the care team applies to the entire claim or a single item.", - path: "Claim.careTeam.extension" - }, "id": { name: "id", dataType: string, @@ -1081,33 +995,35 @@ public type PASClaimInquiryItemDetail record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquiryCareTeamOverallClaimMember record {| - *PASClaimInquiryCareTeam; +public type PASClaimInquiryCareTeam record {| + *r4:BackboneElement; r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; r4:Reference provider; r4:Extension[] modifierExtension?; boolean responsible?; - @constraint:Array { - minLength: 1, - maxLength: 1 - } - r4:Extension[] careTeamClaimScope; string id?; |}; -# FHIR PASClaimInquirySupportingInfoCategoryCodingOne datatype record. +# FHIR PASClaimInquirySupportingInfoCategoryCodingTwo datatype record. # # + system - The identification of the code system that defines the meaning of the symbol in the code. # + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). @r4:DataTypeDefinition { - name: "PASClaimInquirySupportingInfoCategoryCodingOne", + name: "PASClaimInquirySupportingInfoCategoryCodingTwo", baseType: (), elements: { "system": { @@ -1134,161 +1050,14 @@ public type PASClaimInquiryCareTeamOverallClaimMember record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquirySupportingInfoCategoryCodingOne record {| +public type PASClaimInquirySupportingInfoCategoryCodingTwo record {| *r4:Coding; r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; - r4:code code = "dischargeDates"; + r4:code code = "admissionDates"; |}; -# FHIR PASClaimInquiryCareTeam datatype record. -# -# + qualification - The qualification of the practitioner which is applicable for this service. -# + sequence - A number to uniquely identify care team entries. -# + extension - An Extension -# + role - The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team. -# + provider - Member of the team who provided the product or service. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + responsible - The party who is billing and/or responsible for the claimed products or services. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -@r4:DataTypeDefinition { - name: "PASClaimInquiryCareTeam", - baseType: (), - elements: { - "qualification": { - name: "qualification", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "The qualification of the practitioner which is applicable for this service.", - path: "Claim.careTeam.qualification" - }, - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify care team entries.", - path: "Claim.careTeam.sequence" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 1, - max: int:MAX_VALUE, - isArray: true, - description: "An Extension", - path: "Claim.careTeam.extension" - }, - "role": { - name: "role", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team.", - path: "Claim.careTeam.role" - }, - "provider": { - name: "provider", - dataType: r4:Reference, - min: 1, - max: 1, - isArray: false, - description: "Member of the team who provided the product or service.", - path: "Claim.careTeam.provider" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.careTeam.modifierExtension" - }, - "responsible": { - name: "responsible", - dataType: boolean, - min: 0, - max: 1, - isArray: false, - description: "The party who is billing and/or responsible for the claimed products or services.", - path: "Claim.careTeam.responsible" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.careTeam.id" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimInquiryCareTeam record {| - *r4:BackboneElement; - - r4:CodeableConcept qualification?; - r4:positiveInt sequence; - @constraint:Array { - minLength: 1 - } - r4:Extension[] extension; - r4:CodeableConcept role?; - r4:Reference provider; - r4:Extension[] modifierExtension?; - boolean responsible?; - string id?; -|}; - -# FHIR PASClaimInquirySupportingInfoCategoryCodingTwo datatype record. -# -# + system - The identification of the code system that defines the meaning of the symbol in the code. -# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). -@r4:DataTypeDefinition { - name: "PASClaimInquirySupportingInfoCategoryCodingTwo", - baseType: (), - elements: { - "system": { - name: "system", - dataType: r4:uri, - min: 1, - max: 1, - isArray: false, - description: "The identification of the code system that defines the meaning of the symbol in the code.", - path: "Claim.supportingInfo.category.coding.system" - }, - "code": { - name: "code", - dataType: r4:code, - min: 1, - max: 1, - isArray: false, - description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", - path: "Claim.supportingInfo.category.coding.code" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimInquirySupportingInfoCategoryCodingTwo record {| - *r4:Coding; - - r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; - r4:code code = "admissionDates"; -|}; - -# FHIR PASClaimInquiryItemDetailSubDetail datatype record. +# FHIR PASClaimInquiryItemDetailSubDetail datatype record. # # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. @@ -1527,7 +1296,7 @@ public type PASClaimInquiryItemDetailSubDetail record {| "timingPeriod": { name: "timingPeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -1545,7 +1314,7 @@ public type PASClaimInquiryItemDetailSubDetail record {| "timingDate": { name: "timingDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -1619,9 +1388,9 @@ public type PASClaimInquirySupportingInfoPatientEvent record {| r4:Extension[] extension?; r4:CodeableConcept code?; r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:date timingDate?; r4:positiveInt sequence; r4:Attachment valueAttachment?; string valueString?; @@ -1656,59 +1425,48 @@ public type PASClaimInquirySupportingInfoCategoryTwo record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimInquirySupportingInfoCategoryCodingTwo[] coding; |}; -# FHIR PASClaimInquiryItem datatype record. + +# FHIR PASClaimInquiryAccident datatype record. # -# + extension - An Extension -# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + date - Date of an accident event related to the products and services contained in the claim. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. -# + servicedPeriod - The date or dates when the service or product was supplied, performed or completed. -# + informationSequence - Exceptions, special conditions and supporting information applicable for this service or product. -# + revenue - The type of revenue or cost center providing the product and/or service. -# + locationCodeableConcept - Where the product or service was provided. -# + diagnosisSequence - Diagnosis applicable for this service or product. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. -# + net - The quantity times the unit price for an additional service or product or charge. -# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + quantity - The number of repetitions of a service or product. -# + programCode - Identifies the program under which this may be recovered. -# + careTeamSequence - CareTeam members related to this service or product. -# + encounter - The Encounters during which this Claim was created or to which the creation of this record is tightly associated. -# + sequence - A number to uniquely identify item entries. -# + bodySite - Physical service site on the patient (limb, tooth, etc.). -# + subSite - A region or surface of the bodySite, e.g. limb region or tooth surface(s). -# + detail - A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. -# + servicedDate - The date or dates when the service or product was supplied, performed or completed. -# + udi - Unique Device Identifiers associated with this line item. -# + category - Code to identify the general type of benefits under which products and services are provided. -# + procedureSequence - Procedures applicable for this service or product. +# + locationAddress - The physical location of the accident event. +# + 'type - The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers. @r4:DataTypeDefinition { - name: "PASClaimInquiryItem", + name: "PASClaimInquiryAccident", baseType: (), elements: { + "date": { + name: "date", + dataType: r4:date, + min: 1, + max: 1, + isArray: false, + description: "Date of an accident event related to the products and services contained in the claim.", + path: "Claim.accident.date" + }, "extension": { name: "extension", dataType: r4:Extension, min: 0, max: int:MAX_VALUE, isArray: true, - description: "An Extension", - path: "Claim.item.extension" - }, - "modifier": { - name: "modifier", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Item typification or modifiers codes to convey additional context for the product or service.", - path: "Claim.item.modifier" + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.accident.extension" }, "modifierExtension": { name: "modifierExtension", @@ -1717,301 +1475,28 @@ public type PASClaimInquirySupportingInfoCategoryTwo record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.item.modifierExtension" - }, - "productOrService": { - name: "productOrService", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - path: "Claim.item.productOrService" + path: "Claim.accident.modifierExtension" }, - "servicedPeriod": { - name: "servicedPeriod", - dataType: r4:Period, + "id": { + name: "id", + dataType: string, min: 0, max: 1, isArray: false, - description: "The date or dates when the service or product was supplied, performed or completed.", - path: "Claim.item.serviced[x]" - }, - "informationSequence": { - name: "informationSequence", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Exceptions, special conditions and supporting information applicable for this service or product.", - path: "Claim.item.informationSequence" + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.accident.id" }, - "revenue": { - name: "revenue", - dataType: r4:CodeableConcept, + "locationAddress": { + name: "locationAddress", + dataType: r4:Address, min: 0, max: 1, isArray: false, - description: "The type of revenue or cost center providing the product and/or service.", - path: "Claim.item.revenue" + description: "The physical location of the accident event.", + path: "Claim.accident.location[x]" }, - "locationCodeableConcept": { - name: "locationCodeableConcept", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "Where the product or service was provided.", - path: "Claim.item.location[x]" - }, - "diagnosisSequence": { - name: "diagnosisSequence", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Diagnosis applicable for this service or product.", - path: "Claim.item.diagnosisSequence" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.item.id" - }, - "factor": { - name: "factor", - dataType: decimal, - min: 0, - max: 1, - isArray: false, - description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - path: "Claim.item.factor" - }, - "net": { - name: "net", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "The quantity times the unit price for an additional service or product or charge.", - path: "Claim.item.net" - }, - "unitPrice": { - name: "unitPrice", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - path: "Claim.item.unitPrice" - }, - "quantity": { - name: "quantity", - dataType: r4:Quantity, - min: 0, - max: 1, - isArray: false, - description: "The number of repetitions of a service or product.", - path: "Claim.item.quantity" - }, - "programCode": { - name: "programCode", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Identifies the program under which this may be recovered.", - path: "Claim.item.programCode" - }, - "careTeamSequence": { - name: "careTeamSequence", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "CareTeam members related to this service or product.", - path: "Claim.item.careTeamSequence" - }, - "encounter": { - name: "encounter", - dataType: r4:Reference, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The Encounters during which this Claim was created or to which the creation of this record is tightly associated.", - path: "Claim.item.encounter" - }, - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify item entries.", - path: "Claim.item.sequence" - }, - "bodySite": { - name: "bodySite", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "Physical service site on the patient (limb, tooth, etc.).", - path: "Claim.item.bodySite" - }, - "subSite": { - name: "subSite", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", - path: "Claim.item.subSite" - }, - "detail": { - name: "detail", - dataType: PASClaimInquiryItemDetail, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", - path: "Claim.item.detail" - }, - "servicedDate": { - name: "servicedDate", - dataType: r4:date, - min: 0, - max: 1, - isArray: false, - description: "The date or dates when the service or product was supplied, performed or completed.", - path: "Claim.item.serviced[x]" - }, - "udi": { - name: "udi", - dataType: r4:Reference, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Unique Device Identifiers associated with this line item.", - path: "Claim.item.udi" - }, - "category": { - name: "category", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "Code to identify the general type of benefits under which products and services are provided.", - path: "Claim.item.category" - }, - "procedureSequence": { - name: "procedureSequence", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Procedures applicable for this service or product.", - path: "Claim.item.procedureSequence" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimInquiryItem record {| - *r4:BackboneElement; - - r4:Extension[] extension?; - r4:CodeableConcept[] modifier?; - r4:Extension[] modifierExtension?; - r4:CodeableConcept productOrService; - r4:Period servicedPeriod?; - r4:positiveInt[] informationSequence?; - r4:CodeableConcept revenue?; - r4:CodeableConcept locationCodeableConcept?; - r4:positiveInt[] diagnosisSequence?; - string id?; - decimal factor?; - r4:Money net?; - r4:Money unitPrice?; - r4:Quantity quantity?; - r4:CodeableConcept[] programCode?; - r4:positiveInt[] careTeamSequence?; - r4:Reference[] encounter?; - r4:positiveInt sequence; - r4:CodeableConcept bodySite?; - r4:CodeableConcept[] subSite?; - PASClaimInquiryItemDetail[] detail?; - r4:date servicedDate?; - r4:Reference[] udi?; - r4:CodeableConcept category?; - r4:positiveInt[] procedureSequence?; -|}; - -# FHIR PASClaimInquiryAccident datatype record. -# -# + date - Date of an accident event related to the products and services contained in the claim. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + locationAddress - The physical location of the accident event. -# + 'type - The type or context of the accident event for the purposes of selection of potential insurance coverages and determination of coordination between insurers. -@r4:DataTypeDefinition { - name: "PASClaimInquiryAccident", - baseType: (), - elements: { - "date": { - name: "date", - dataType: r4:date, - min: 1, - max: 1, - isArray: false, - description: "Date of an accident event related to the products and services contained in the claim.", - path: "Claim.accident.date" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.accident.extension" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.accident.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.accident.id" - }, - "locationAddress": { - name: "locationAddress", - dataType: r4:Address, - min: 0, - max: 1, - isArray: false, - description: "The physical location of the accident event.", - path: "Claim.accident.location[x]" - }, - "type": { - name: "type", + "type": { + name: "type", dataType: r4:CodeableConcept, min: 0, max: 1, @@ -2119,196 +1604,19 @@ public type PASClaimInquiryRelated record {| r4:CodeableConcept relationship?; |}; -# FHIR PASClaimInquiryPayee datatype record. + +# FHIR PASClaimInquiryCareTeamItemClaimMember datatype record. # -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + qualification - The qualification of the practitioner which is applicable for this service. +# + sequence - A number to uniquely identify care team entries. +# + extension - An Extension +# + role - The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team. +# + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + responsible - The party who is billing and/or responsible for the claimed products or services. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - Type of Party to be reimbursed: subscriber, provider, other. -# + party - Reference to the individual or organization to whom any payment will be made. @r4:DataTypeDefinition { - name: "PASClaimInquiryPayee", - baseType: (), - elements: { - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.payee.extension" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.payee.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.payee.id" - }, - "type": { - name: "type", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "Type of Party to be reimbursed: subscriber, provider, other.", - path: "Claim.payee.type" - }, - "party": { - name: "party", - dataType: r4:Reference, - min: 0, - max: 1, - isArray: false, - description: "Reference to the individual or organization to whom any payment will be made.", - path: "Claim.payee.party" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimInquiryPayee record {| - *r4:BackboneElement; - - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; - string id?; - r4:CodeableConcept 'type; - r4:Reference party?; -|}; - -# FHIR PASClaimInquiryDiagnosis datatype record. -# -# + sequence - A number to uniquely identify diagnosis entries. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + onAdmission - Indication of whether the diagnosis was present on admission to a facility. -# + packageCode - A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - When the condition was observed or the relative ranking. -# + diagnosisCodeableConcept - The nature of illness or problem in a coded form or as a reference to an external defined Condition. -@r4:DataTypeDefinition { - name: "PASClaimInquiryDiagnosis", - baseType: (), - elements: { - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify diagnosis entries.", - path: "Claim.diagnosis.sequence" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.diagnosis.extension" - }, - "onAdmission": { - name: "onAdmission", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "Indication of whether the diagnosis was present on admission to a facility.", - path: "Claim.diagnosis.onAdmission" - }, - "packageCode": { - name: "packageCode", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.", - path: "Claim.diagnosis.packageCode" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.diagnosis.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.diagnosis.id" - }, - "type": { - name: "type", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "When the condition was observed or the relative ranking.", - path: "Claim.diagnosis.type" - }, - "diagnosisCodeableConcept": { - name: "diagnosisCodeableConcept", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", - path: "Claim.diagnosis.diagnosis[x]" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimInquiryDiagnosis record {| - *r4:BackboneElement; - - r4:positiveInt sequence; - r4:Extension[] extension?; - r4:CodeableConcept onAdmission?; - r4:CodeableConcept packageCode?; - r4:Extension[] modifierExtension?; - string id?; - r4:CodeableConcept 'type?; - r4:CodeableConcept diagnosisCodeableConcept; -|}; - -# FHIR PASClaimInquiryCareTeamItemClaimMember datatype record. -# -# + qualification - The qualification of the practitioner which is applicable for this service. -# + sequence - A number to uniquely identify care team entries. -# + extension - An Extension -# + role - The lead, assisting or supervising practitioner and their discipline if a multidisciplinary team. -# + provider - Member of the team who provided the product or service. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + responsible - The party who is billing and/or responsible for the claimed products or services. -# + careTeamClaimScope - A flag that indicates whether the care team applies to the entire claim or a single item. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -@r4:DataTypeDefinition { - name: "PASClaimInquiryCareTeamItemClaimMember", + name: "PASClaimInquiryCareTeamItemClaimMember", baseType: (), elements: { "qualification": { @@ -2374,15 +1682,7 @@ public type PASClaimInquiryDiagnosis record {| description: "The party who is billing and/or responsible for the claimed products or services.", path: "Claim.careTeam.responsible" }, - "careTeamClaimScope": { - name: "careTeamClaimScope", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A flag that indicates whether the care team applies to the entire claim or a single item.", - path: "Claim.careTeam.extension" - }, + "id": { name: "id", dataType: string, @@ -2404,18 +1704,20 @@ public type PASClaimInquiryCareTeamItemClaimMember record {| r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; r4:Reference provider; r4:Extension[] modifierExtension?; boolean responsible?; - @constraint:Array { - minLength: 1, - maxLength: 1 - } - r4:Extension[] careTeamClaimScope; string id?; |}; @@ -2445,34 +1747,271 @@ public type PASClaimInquirySupportingInfoCategoryOne record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimInquirySupportingInfoCategoryCodingOne[] coding; |}; -# FHIR PASClaimInquiryProcedure datatype record. + +# FHIR PASClaimInquirySupportingInfoCategory datatype record. # -# + date - Date and optionally time the procedure was performed. -# + sequence - A number to uniquely identify procedure entries. +# + coding - A reference to a code defined by a terminology system. +@r4:DataTypeDefinition { + name: "PASClaimInquirySupportingInfoCategory", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASClaimInquirySupportingInfoCategoryCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Claim.supportingInfo.category.coding" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimInquirySupportingInfoCategory record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimInquirySupportingInfoCategoryCoding[] coding; +|}; + + +# PASClaimInquiryIdentifierUse enum +public enum PASClaimInquiryIdentifierUse { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + +# FHIR PASClaimInquirySupportingInfoDischargeDates datatype record. +# +# + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + reason - Provides the reason in the situation where a reason code is required in addition to the content. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + procedureCodeableConcept - The code or reference to a Procedure resource which identifies the clinical intervention performed. +# + code - System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought. +# + valueReference - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + timingPeriod - The date when or period to which this information refers. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + procedureReference - The code or reference to a Procedure resource which identifies the clinical intervention performed. +# + timingDate - The date when or period to which this information refers. +# + sequence - A number to uniquely identify supporting information entries. +# + valueAttachment - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + valueString - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + udi - Unique Device Identifiers associated with this line item. -# + 'type - When the condition was observed or the relative ranking. +# + category - The general class of the information supplied: information; exception; accident, employment; onset, etc. +# + valueQuantity - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. @r4:DataTypeDefinition { - name: "PASClaimInquiryProcedure", + name: "PASClaimInquirySupportingInfoDischargeDates", baseType: (), elements: { - "date": { - name: "date", - dataType: r4:dateTime, + "valueBoolean": { + name: "valueBoolean", + dataType: boolean, min: 0, - max: 1, + max: 0, isArray: false, - description: "Date and optionally time the procedure was performed.", - path: "Claim.procedure.date" + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" + }, + "reason": { + name: "reason", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Provides the reason in the situation where a reason code is required in addition to the content.", + path: "Claim.supportingInfo.reason" + }, + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.supportingInfo.extension" + }, + "code": { + name: "code", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", + path: "Claim.supportingInfo.code" + }, + "valueReference": { + name: "valueReference", + dataType: r4:Reference, + min: 0, + max: 0, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" + }, + "timingPeriod": { + name: "timingPeriod", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "The date when or period to which this information refers.", + path: "Claim.supportingInfo.timing[x]" + }, + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.supportingInfo.modifierExtension" + }, + "timingDate": { + name: "timingDate", + dataType: r4:date, + min: 0, + max: 1, + isArray: false, + description: "The date when or period to which this information refers.", + path: "Claim.supportingInfo.timing[x]" + }, + "sequence": { + name: "sequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely identify supporting information entries.", + path: "Claim.supportingInfo.sequence" + }, + "valueAttachment": { + name: "valueAttachment", + dataType: r4:Attachment, + min: 0, + max: 0, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" + }, + "valueString": { + name: "valueString", + dataType: string, + min: 0, + max: 0, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" + }, + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.supportingInfo.id" + }, + "category": { + name: "category", + dataType: PASClaimInquirySupportingInfoCategoryOne, + min: 1, + max: 1, + isArray: false, + description: "The general class of the information supplied: information; exception; accident, employment; onset, etc.", + path: "Claim.supportingInfo.category" + }, + "valueQuantity": { + name: "valueQuantity", + dataType: r4:Quantity, + min: 0, + max: 0, + isArray: false, + description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", + path: "Claim.supportingInfo.value[x]" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimInquirySupportingInfoDischargeDates record {| + *PASClaimInquirySupportingInfo; + + boolean valueBoolean?; + r4:CodeableConcept reason?; + r4:Extension[] extension?; + r4:CodeableConcept code?; + r4:Reference valueReference?; + r4:Period timingPeriod?; + r4:Extension[] modifierExtension?; + r4:date timingDate?; + r4:positiveInt sequence; + r4:Attachment valueAttachment?; + string valueString?; + string id?; + PASClaimInquirySupportingInfoCategoryOne category; + r4:Quantity valueQuantity?; +|}; + +# FHIR PASClaimInquiryInsurance datatype record. +# +# + coverage - Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system. +# + identifier - The business identifier to be used when the claim is sent for adjudication against this insurance policy. +# + sequence - A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + businessArrangement - A business agreement number established between the provider and the insurer for special business processing purposes. +# + claimResponse - The result of the adjudication of the line items for the Coverage specified in this insurance. +# + focal - A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + preAuthRef - Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +@r4:DataTypeDefinition { + name: "PASClaimInquiryInsurance", + baseType: (), + elements: { + "coverage": { + name: "coverage", + dataType: r4:Reference, + min: 1, + max: 1, + isArray: false, + description: "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + path: "Claim.insurance.coverage" + }, + "identifier": { + name: "identifier", + dataType: r4:Identifier, + min: 0, + max: 1, + isArray: false, + description: "The business identifier to be used when the claim is sent for adjudication against this insurance policy.", + path: "Claim.insurance.identifier" }, "sequence": { name: "sequence", @@ -2480,54 +2019,598 @@ public type PASClaimInquirySupportingInfoCategoryOne record {| min: 1, max: 1, isArray: false, - description: "A number to uniquely identify procedure entries.", - path: "Claim.procedure.sequence" + description: "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", + path: "Claim.insurance.sequence" + }, + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.insurance.extension" + }, + "businessArrangement": { + name: "businessArrangement", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "A business agreement number established between the provider and the insurer for special business processing purposes.", + path: "Claim.insurance.businessArrangement" + }, + "claimResponse": { + name: "claimResponse", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "The result of the adjudication of the line items for the Coverage specified in this insurance.", + path: "Claim.insurance.claimResponse" + }, + "focal": { + name: "focal", + dataType: boolean, + min: 1, + max: 1, + isArray: false, + description: "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", + path: "Claim.insurance.focal" + }, + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.insurance.modifierExtension" + }, + "preAuthRef": { + name: "preAuthRef", + dataType: string, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.", + path: "Claim.insurance.preAuthRef" + }, + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.insurance.id" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimInquiryInsurance record {| + *r4:BackboneElement; + + r4:Reference coverage; + r4:Identifier identifier?; + r4:positiveInt sequence; + r4:Extension[] extension?; + string businessArrangement?; + r4:Reference claimResponse?; + boolean focal; + r4:Extension[] modifierExtension?; + string[] preAuthRef?; + string id?; +|}; + + +# PASClaimInquiryStatus enum +public enum PASClaimInquiryStatus { + CODE_STATUS_DRAFT = "draft", + CODE_STATUS_ACTIVE = "active", + CODE_STATUS_CANCELLED = "cancelled", + CODE_STATUS_ENTERED_IN_ERROR = "entered-in-error" +} + +# FHIR PASClaimInquiryItemDetail datatype record. +# +# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + quantity - The number of repetitions of a service or product. +# + programCode - Identifies the program under which this may be recovered. +# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + subDetail - A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. +# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. +# + sequence - A number to uniquely identify item entries. +# + revenue - The type of revenue or cost center providing the product and/or service. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + udi - Unique Device Identifiers associated with this line item. +# + category - Code to identify the general type of benefits under which products and services are provided. +# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. +# + net - The quantity times the unit price for an additional service or product or charge. + +@r4:DataTypeDefinition { + name: "PASClaimInquiryItemDetail", + baseType: (), + elements: { + "unitPrice": { + name: "unitPrice", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", + path: "Claim.item.detail.unitPrice" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.item.detail.extension" + }, + + "quantity": { + name: "quantity", + dataType: r4:Quantity, + min: 0, + max: 1, + isArray: false, + description: "The number of repetitions of a service or product.", + path: "Claim.item.detail.quantity" + }, + + "programCode": { + name: "programCode", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Identifies the program under which this may be recovered.", + path: "Claim.item.detail.programCode" + }, + + "modifier": { + name: "modifier", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Item typification or modifiers codes to convey additional context for the product or service.", + path: "Claim.item.detail.modifier" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.item.detail.modifierExtension" + }, + + "subDetail": { + name: "subDetail", + dataType: PASClaimInquiryItemDetailSubDetail, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + path: "Claim.item.detail.subDetail" + }, + + "productOrService": { + name: "productOrService", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", + path: "Claim.item.detail.productOrService" + }, + + "sequence": { + name: "sequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely identify item entries.", + path: "Claim.item.detail.sequence" + }, + + "revenue": { + name: "revenue", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "The type of revenue or cost center providing the product and/or service.", + path: "Claim.item.detail.revenue" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.item.detail.id" + }, + + "udi": { + name: "udi", + dataType: r4:Reference, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Unique Device Identifiers associated with this line item.", + path: "Claim.item.detail.udi" + }, + + "category": { + name: "category", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Code to identify the general type of benefits under which products and services are provided.", + path: "Claim.item.detail.category" + }, + + "factor": { + name: "factor", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", + path: "Claim.item.detail.factor" + }, + + "net": { + name: "net", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "The quantity times the unit price for an additional service or product or charge.", + path: "Claim.item.detail.net" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimInquiryItemDetail record {| + *r4:BackboneElement; + + r4:Money unitPrice?; + r4:Extension [] extension?; + r4:Quantity quantity?; + r4:CodeableConcept [] programCode?; + r4:CodeableConcept [] modifier?; + r4:Extension [] modifierExtension?; + PASClaimInquiryItemDetailSubDetail [] subDetail?; + r4:CodeableConcept productOrService; + r4:positiveInt sequence; + r4:CodeableConcept revenue?; + string id?; + r4:Reference [] udi?; + r4:CodeableConcept category?; + decimal factor?; + r4:Money net?; +|}; + + +# FHIR PASClaimInquirySupportingInfoCategoryCodingOne datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASClaimInquirySupportingInfoCategoryCodingOne", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Claim.supportingInfo.category.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Claim.supportingInfo.category.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimInquirySupportingInfoCategoryCodingOne record {| + *r4:Coding; + + r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; + r4:code code = "dischargeDates"; +|}; + + +# FHIR PASClaimInquiryItem datatype record. +# +# + extension - An Extension +# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. +# + servicedPeriod - The date or dates when the service or product was supplied, performed or completed. +# + informationSequence - Exceptions, special conditions and supporting information applicable for this service or product. +# + revenue - The type of revenue or cost center providing the product and/or service. +# + locationCodeableConcept - Where the product or service was provided. +# + diagnosisSequence - Diagnosis applicable for this service or product. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. +# + net - The quantity times the unit price for an additional service or product or charge. +# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. +# + quantity - The comparator is not used on a SimpleQuantity +# + programCode - Identifies the program under which this may be recovered. +# + careTeamSequence - CareTeam members related to this service or product. +# + encounter - The Encounters during which this Claim was created or to which the creation of this record is tightly associated. +# + sequence - A number to uniquely identify item entries. +# + bodySite - Physical service site on the patient (limb, tooth, etc.). +# + subSite - A region or surface of the bodySite, e.g. limb region or tooth surface(s). +# + detail - A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items. +# + servicedDate - The date or dates when the service or product was supplied, performed or completed. +# + udi - Unique Device Identifiers associated with this line item. +# + category - Code to identify the general type of benefits under which products and services are provided. +# + procedureSequence - Procedures applicable for this service or product. + +@r4:DataTypeDefinition { + name: "PASClaimInquiryItem", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "Claim.item.extension" + }, + + "modifier": { + name: "modifier", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Item typification or modifiers codes to convey additional context for the product or service.", + path: "Claim.item.modifier" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.item.modifierExtension" + }, + + "productOrService": { + name: "productOrService", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", + path: "Claim.item.productOrService" + }, + + "servicedPeriod": { + name: "servicedPeriod", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "The date or dates when the service or product was supplied, performed or completed.", + path: "Claim.item.serviced[x]" + }, + + "informationSequence": { + name: "informationSequence", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Exceptions, special conditions and supporting information applicable for this service or product.", + path: "Claim.item.informationSequence" + }, + + "revenue": { + name: "revenue", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "The type of revenue or cost center providing the product and/or service.", + path: "Claim.item.revenue" + }, + + "locationCodeableConcept": { + name: "locationCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Where the product or service was provided.", + path: "Claim.item.location[x]" + }, + + "diagnosisSequence": { + name: "diagnosisSequence", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Diagnosis applicable for this service or product.", + path: "Claim.item.diagnosisSequence" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.item.id" + }, + + "factor": { + name: "factor", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", + path: "Claim.item.factor" + }, + + "net": { + name: "net", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "The quantity times the unit price for an additional service or product or charge.", + path: "Claim.item.net" + }, + + "unitPrice": { + name: "unitPrice", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", + path: "Claim.item.unitPrice" + }, + + "quantity": { + name: "quantity", + dataType: r4:Quantity, + min: 0, + max: 1, + isArray: false, + description: "The comparator is not used on a SimpleQuantity", + path: "Claim.item.quantity" }, - "extension": { - name: "extension", - dataType: r4:Extension, + + "programCode": { + name: "programCode", + dataType: r4:CodeableConcept, min: 0, max: int:MAX_VALUE, isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.procedure.extension" - }, - "procedureCodeableConcept": { - name: "procedureCodeableConcept", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", - path: "Claim.procedure.procedure[x]" + description: "Identifies the program under which this may be recovered.", + path: "Claim.item.programCode" }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, + + "careTeamSequence": { + name: "careTeamSequence", + dataType: r4:positiveInt, min: 0, max: int:MAX_VALUE, isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.procedure.modifierExtension" + description: "CareTeam members related to this service or product.", + path: "Claim.item.careTeamSequence" }, - "procedureReference": { - name: "procedureReference", + + "encounter": { + name: "encounter", dataType: r4:Reference, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The Encounters during which this Claim was created or to which the creation of this record is tightly associated.", + path: "Claim.item.encounter" + }, + + "sequence": { + name: "sequence", + dataType: r4:positiveInt, min: 1, max: 1, isArray: false, - description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", - path: "Claim.procedure.procedure[x]" + description: "A number to uniquely identify item entries.", + path: "Claim.item.sequence" }, - "id": { - name: "id", - dataType: string, + + "bodySite": { + name: "bodySite", + dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.procedure.id" + description: "Physical service site on the patient (limb, tooth, etc.).", + path: "Claim.item.bodySite" + }, + + "subSite": { + name: "subSite", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A region or surface of the bodySite, e.g. limb region or tooth surface(s).", + path: "Claim.item.subSite" + }, + + "detail": { + name: "detail", + dataType: PASClaimInquiryItemDetail, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A claim detail line. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + path: "Claim.item.detail" + }, + + "servicedDate": { + name: "servicedDate", + dataType: r4:date, + min: 0, + max: 1, + isArray: false, + description: "The date or dates when the service or product was supplied, performed or completed.", + path: "Claim.item.serviced[x]" }, + "udi": { name: "udi", dataType: r4:Reference, @@ -2535,106 +2618,172 @@ public type PASClaimInquirySupportingInfoCategoryOne record {| max: int:MAX_VALUE, isArray: true, description: "Unique Device Identifiers associated with this line item.", - path: "Claim.procedure.udi" + path: "Claim.item.udi" }, - "type": { - name: "type", + + "category": { + name: "category", dataType: r4:CodeableConcept, min: 0, + max: 1, + isArray: false, + description: "Code to identify the general type of benefits under which products and services are provided.", + path: "Claim.item.category" + }, + + "procedureSequence": { + name: "procedureSequence", + dataType: r4:positiveInt, + min: 0, max: int:MAX_VALUE, isArray: true, - description: "When the condition was observed or the relative ranking.", - path: "Claim.procedure.type" + description: "Procedures applicable for this service or product.", + path: "Claim.item.procedureSequence" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquiryProcedure record {| + +public type PASClaimInquiryItem record {| *r4:BackboneElement; - r4:dateTime date?; - r4:positiveInt sequence; - r4:Extension[] extension?; - r4:CodeableConcept procedureCodeableConcept; - r4:Extension[] modifierExtension?; - r4:Reference procedureReference; + r4:Extension [] extension?; + r4:CodeableConcept [] modifier?; + r4:Extension [] modifierExtension?; + r4:CodeableConcept productOrService; + r4:Period servicedPeriod?; + r4:positiveInt [] informationSequence?; + r4:CodeableConcept revenue?; + r4:CodeableConcept locationCodeableConcept?; + r4:positiveInt [] diagnosisSequence?; string id?; - r4:Reference[] udi?; - r4:CodeableConcept[] 'type?; + decimal factor?; + r4:Money net?; + r4:Money unitPrice?; + r4:Quantity quantity?; + r4:CodeableConcept [] programCode?; + r4:positiveInt [] careTeamSequence?; + r4:Reference [] encounter?; + r4:positiveInt sequence; + r4:CodeableConcept bodySite?; + r4:CodeableConcept [] subSite?; + PASClaimInquiryItemDetail [] detail?; + r4:date servicedDate?; + r4:Reference [] udi?; + r4:CodeableConcept category?; + r4:positiveInt [] procedureSequence?; |}; -# FHIR PASClaimInquirySupportingInfoCategory datatype record. + +# FHIR PASClaimInquiryPayee datatype record. # -# + coding - A reference to a code defined by a terminology system. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - Type of Party to be reimbursed: subscriber, provider, other. +# + party - Reference to the individual or organization to whom any payment will be made. + @r4:DataTypeDefinition { - name: "PASClaimInquirySupportingInfoCategory", + name: "PASClaimInquiryPayee", baseType: (), elements: { - "coding": { - name: "coding", - dataType: PASClaimInquirySupportingInfoCategoryCoding, - min: 1, + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, max: int:MAX_VALUE, isArray: true, - description: "A reference to a code defined by a terminology system.", - path: "Claim.supportingInfo.category.coding" + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Claim.payee.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Claim.payee.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Claim.payee.id" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "Type of Party to be reimbursed: subscriber, provider, other.", + path: "Claim.payee.type" + }, + + "party": { + name: "party", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "Reference to the individual or organization to whom any payment will be made.", + path: "Claim.payee.party" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquirySupportingInfoCategory record {| - *r4:CodeableConcept; - @constraint:Array { - minLength: 1 - } - PASClaimInquirySupportingInfoCategoryCoding[] coding; +public type PASClaimInquiryPayee record {| + *r4:BackboneElement; + + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string id?; + r4:CodeableConcept 'type; + r4:Reference party?; |}; -# FHIR PASClaimInquirySupportingInfoDischargeDates datatype record. + +# FHIR PASClaimInquiryDiagnosis datatype record. # -# + valueBoolean - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + reason - Provides the reason in the situation where a reason code is required in addition to the content. +# + sequence - A number to uniquely identify diagnosis entries. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + code - System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought. -# + valueReference - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + timingPeriod - The date when or period to which this information refers. +# + onAdmission - Indication of whether the diagnosis was present on admission to a facility. +# + packageCode - A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + timingDate - The date when or period to which this information refers. -# + sequence - A number to uniquely identify supporting information entries. -# + valueAttachment - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. -# + valueString - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + category - The general class of the information supplied: information; exception; accident, employment; onset, etc. -# + valueQuantity - Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data. +# + 'type - When the condition was observed or the relative ranking. +# + diagnosisCodeableConcept - The nature of illness or problem in a coded form or as a reference to an external defined Condition. + @r4:DataTypeDefinition { - name: "PASClaimInquirySupportingInfoDischargeDates", + name: "PASClaimInquiryDiagnosis", baseType: (), elements: { - "valueBoolean": { - name: "valueBoolean", - dataType: boolean, - min: 0, - max: 0, - isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" - }, - "reason": { - name: "reason", - dataType: r4:CodeableConcept, - min: 0, + "sequence": { + name: "sequence", + dataType: r4:positiveInt, + min: 1, max: 1, - isArray: false, - description: "Provides the reason in the situation where a reason code is required in addition to the content.", - path: "Claim.supportingInfo.reason" + isArray: false, + description: "A number to uniquely identify diagnosis entries.", + path: "Claim.diagnosis.sequence" }, + "extension": { name: "extension", dataType: r4:Extension, @@ -2642,35 +2791,29 @@ public type PASClaimInquirySupportingInfoCategory record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.supportingInfo.extension" + path: "Claim.diagnosis.extension" }, - "code": { - name: "code", + + "onAdmission": { + name: "onAdmission", dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "System and code pertaining to the specific information regarding special conditions relating to the setting, treatment or patient for which care is sought.", - path: "Claim.supportingInfo.code" + description: "Indication of whether the diagnosis was present on admission to a facility.", + path: "Claim.diagnosis.onAdmission" }, - "valueReference": { - name: "valueReference", - dataType: r4:Reference, + + "packageCode": { + name: "packageCode", + dataType: r4:CodeableConcept, min: 0, - max: 0, - isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" - }, - "timingPeriod": { - name: "timingPeriod", - dataType: r4:Period, - min: 1, max: 1, isArray: false, - description: "The date when or period to which this information refers.", - path: "Claim.supportingInfo.timing[x]" + description: "A package billing code or bundle code used to group products and services to a particular health condition (such as heart attack) which is based on a predetermined grouping code system.", + path: "Claim.diagnosis.packageCode" }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -2678,44 +2821,9 @@ public type PASClaimInquirySupportingInfoCategory record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.supportingInfo.modifierExtension" - }, - "timingDate": { - name: "timingDate", - dataType: r4:date, - min: 1, - max: 1, - isArray: false, - description: "The date when or period to which this information refers.", - path: "Claim.supportingInfo.timing[x]" - }, - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify supporting information entries.", - path: "Claim.supportingInfo.sequence" - }, - "valueAttachment": { - name: "valueAttachment", - dataType: r4:Attachment, - min: 0, - max: 0, - isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" - }, - "valueString": { - name: "valueString", - dataType: string, - min: 0, - max: 0, - isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" + path: "Claim.diagnosis.modifierExtension" }, + "id": { name: "id", dataType: string, @@ -2723,94 +2831,92 @@ public type PASClaimInquirySupportingInfoCategory record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.supportingInfo.id" + path: "Claim.diagnosis.id" }, - "category": { - name: "category", - dataType: PASClaimInquirySupportingInfoCategoryOne, - min: 1, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 0, max: 1, - isArray: false, - description: "The general class of the information supplied: information; exception; accident, employment; onset, etc.", - path: "Claim.supportingInfo.category" + isArray: true, + description: "When the condition was observed or the relative ranking.", + path: "Claim.diagnosis.type" }, - "valueQuantity": { - name: "valueQuantity", - dataType: r4:Quantity, + + "diagnosisCodeableConcept": { + name: "diagnosisCodeableConcept", + dataType: r4:CodeableConcept, min: 0, - max: 0, + max: 1, isArray: false, - description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", - path: "Claim.supportingInfo.value[x]" + description: "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", + path: "Claim.diagnosis.diagnosis[x]" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquirySupportingInfoDischargeDates record {| - *PASClaimInquirySupportingInfo; - boolean valueBoolean?; - r4:CodeableConcept reason?; - r4:Extension[] extension?; - r4:CodeableConcept code?; - r4:Reference valueReference?; - r4:Period timingPeriod; - r4:Extension[] modifierExtension?; - r4:date timingDate; +public type PASClaimInquiryDiagnosis record {| + *r4:BackboneElement; + r4:positiveInt sequence; - r4:Attachment valueAttachment?; - string valueString?; + r4:Extension [] extension?; + r4:CodeableConcept onAdmission?; + r4:CodeableConcept packageCode?; + r4:Extension [] modifierExtension?; string id?; - PASClaimInquirySupportingInfoCategoryOne category; - r4:Quantity valueQuantity?; + @constraint:Array { + maxLength: { + value: 1, + message: "Validation failed for $.Claim.diagnosis.type constraint. This field must be an array containing at most one item." + } + } + r4:CodeableConcept [] 'type?; + r4:CodeableConcept diagnosisCodeableConcept?; |}; -# FHIR PASClaimInquiryInsurance datatype record. + +# FHIR PASClaimInquiryProcedure datatype record. # -# + coverage - Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system. -# + identifier - The business identifier to be used when the claim is sent for adjudication against this insurance policy. -# + sequence - A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order. +# + date - Date and optionally time the procedure was performed. +# + sequence - A number to uniquely identify procedure entries. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + businessArrangement - A business agreement number established between the provider and the insurer for special business processing purposes. -# + claimResponse - The result of the adjudication of the line items for the Coverage specified in this insurance. -# + focal - A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true. +# + procedureCodeableConcept - The code or reference to a Procedure resource which identifies the clinical intervention performed. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + preAuthRef - Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization. +# + procedureReference - The code or reference to a Procedure resource which identifies the clinical intervention performed. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + udi - Unique Device Identifiers associated with this line item. +# + 'type - When the condition was observed or the relative ranking. + @r4:DataTypeDefinition { - name: "PASClaimInquiryInsurance", + name: "PASClaimInquiryProcedure", baseType: (), elements: { - "coverage": { - name: "coverage", - dataType: r4:Reference, - min: 1, - max: 1, - isArray: false, - description: "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", - path: "Claim.insurance.coverage" - }, - "identifier": { - name: "identifier", - dataType: r4:Identifier, + "date": { + name: "date", + dataType: r4:dateTime, min: 0, max: 1, isArray: false, - description: "The business identifier to be used when the claim is sent for adjudication against this insurance policy.", - path: "Claim.insurance.identifier" + description: "Date and optionally time the procedure was performed.", + path: "Claim.procedure.date" }, + "sequence": { name: "sequence", dataType: r4:positiveInt, min: 1, max: 1, isArray: false, - description: "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", - path: "Claim.insurance.sequence" + description: "A number to uniquely identify procedure entries.", + path: "Claim.procedure.sequence" }, + "extension": { name: "extension", dataType: r4:Extension, @@ -2818,35 +2924,19 @@ public type PASClaimInquirySupportingInfoDischargeDates record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Claim.insurance.extension" - }, - "businessArrangement": { - name: "businessArrangement", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "A business agreement number established between the provider and the insurer for special business processing purposes.", - path: "Claim.insurance.businessArrangement" + path: "Claim.procedure.extension" }, - "claimResponse": { - name: "claimResponse", - dataType: r4:Reference, + + "procedureCodeableConcept": { + name: "procedureCodeableConcept", + dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "The result of the adjudication of the line items for the Coverage specified in this insurance.", - path: "Claim.insurance.claimResponse" - }, - "focal": { - name: "focal", - dataType: boolean, - min: 1, - max: 1, - isArray: false, - description: "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", - path: "Claim.insurance.focal" + description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", + path: "Claim.procedure.procedure[x]" }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -2854,17 +2944,19 @@ public type PASClaimInquirySupportingInfoDischargeDates record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Claim.insurance.modifierExtension" + path: "Claim.procedure.modifierExtension" }, - "preAuthRef": { - name: "preAuthRef", - dataType: string, + + "procedureReference": { + name: "procedureReference", + dataType: r4:Reference, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Reference numbers previously provided by the insurer to the provider to be quoted on subsequent claims containing services or products related to the prior authorization.", - path: "Claim.insurance.preAuthRef" + max: 1, + isArray: false, + description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", + path: "Claim.procedure.procedure[x]" }, + "id": { name: "id", dataType: string, @@ -2872,29 +2964,51 @@ public type PASClaimInquirySupportingInfoDischargeDates record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Claim.insurance.id" + path: "Claim.procedure.id" + }, + + "udi": { + name: "udi", + dataType: r4:Reference, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Unique Device Identifiers associated with this line item.", + path: "Claim.procedure.udi" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "When the condition was observed or the relative ranking.", + path: "Claim.procedure.type" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquiryInsurance record {| + +public type PASClaimInquiryProcedure record {| *r4:BackboneElement; - r4:Reference coverage; - r4:Identifier identifier?; + r4:dateTime date?; r4:positiveInt sequence; - r4:Extension[] extension?; - string businessArrangement?; - r4:Reference claimResponse?; - boolean focal; - r4:Extension[] modifierExtension?; - string[] preAuthRef?; + r4:Extension [] extension?; + r4:CodeableConcept procedureCodeableConcept?; + r4:Extension [] modifierExtension?; + r4:Reference procedureReference?; string id?; + r4:Reference [] udi?; + r4:CodeableConcept [] 'type?; |}; + # FHIR PASClaimInquirySupportingInfoCategoryCoding datatype record. # # + system - The identification of the code system that defines the meaning of the symbol in the code. diff --git a/davincipas/resource_pasclaim_inquiry_response.bal b/davincipas/resource_pasclaim_inquiry_response.bal index 1bfe9017..b463526d 100644 --- a/davincipas/resource_pasclaim_inquiry_response.bal +++ b/davincipas/resource_pasclaim_inquiry_response.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,16 +13,19 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. import ballerina/constraint; import ballerinax/health.fhir.r4; +import ballerinax/health.fhir.r4.international401; public const string PROFILE_BASE_PASCLAIMINQUIRYRESPONSE = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claiminquiryresponse"; public const RESOURCE_NAME_PASCLAIMINQUIRYRESPONSE = "ClaimResponse"; +public type PASClaimInquiryResponseExtensions (r4:Extension | ExtensionEpsdtIndicator | ExtensionNursingHomeLevelOfCare | ExtensionProductOrServiceCodeEnd | ExtensionRevenueUnitRateLimit ); + # FHIR PASClaimInquiryResponse resource record. # # + resourceType - The type of the resource describes @@ -37,6 +40,7 @@ public const RESOURCE_NAME_PASCLAIMINQUIRYRESPONSE = "ClaimResponse"; # + 'error - Errors encountered during the processing of the adjudication. # + 'type - A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service. # + processNote - A note that describes or explains adjudication results in a human readable form. +# + adjudication - The adjudication results which are presented at the header level rather than at the line-item or add-item levels. # + addItem - The first-tier service adjudications for payor added product or service lines. # + total - Categorized monetary totals for the adjudication. # + fundsReserve - A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom. @@ -76,7 +80,7 @@ public const RESOURCE_NAME_PASCLAIMINQUIRYRESPONSE = "ClaimResponse"; "request" : { name: "request", dataType: r4:Reference, - min: 0, + min: 1, max: 1, isArray: false, path: "ClaimResponse.request" @@ -157,6 +161,16 @@ public const RESOURCE_NAME_PASCLAIMINQUIRYRESPONSE = "ClaimResponse"; isArray: true, path: "ClaimResponse.processNote" }, + + "adjudication" : { + name: "adjudication", + dataType: PASClaimInquiryResponseAdjudication, + min: 0, + max: int:MAX_VALUE, + isArray: true, + path: "ClaimResponse.adjudication" + }, + "addItem" : { name: "addItem", dataType: PASClaimInquiryResponseAddItem, @@ -358,7 +372,7 @@ public type PASClaimInquiryResponse record {| RESOURCE_NAME_PASCLAIMINQUIRYRESPONSE resourceType = RESOURCE_NAME_PASCLAIMINQUIRYRESPONSE; PASClaimInquiryResponseInsurance[] insurance?; - r4:Reference request?; + r4:Reference request; r4:Extension[] extension?; PASClaimInquiryResponseUse use; r4:Extension[] modifierExtension?; @@ -368,6 +382,7 @@ public type PASClaimInquiryResponse record {| PASClaimInquiryResponseError[] 'error?; r4:CodeableConcept 'type; PASClaimInquiryResponseProcessNote[] processNote?; + PASClaimInquiryResponseAdjudication [] adjudication?; PASClaimInquiryResponseAddItem[] addItem?; PASClaimInquiryResponseTotal[] total?; r4:CodeableConcept fundsReserve?; @@ -394,200 +409,13 @@ public type PASClaimInquiryResponse record {| r4:Element ...; |}; -# FHIR PASClaimInquiryResponseItemAdjudication datatype record. -# -# + reason - A code supporting the understanding of the adjudication result and explaining variance from expected amount. -# + amount - Monetary amount associated with the category. -# + extension - An Extension -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. -# + reviewAction - The details of the review action that is necessary for the authorization. -# + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. -@r4:DataTypeDefinition { - name: "PASClaimInquiryResponseItemAdjudication", - baseType: (), - elements: { - "reason": { - name: "reason", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", - path: "ClaimResponse.item.adjudication.reason" - }, - "amount": { - name: "amount", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "Monetary amount associated with the category.", - path: "ClaimResponse.item.adjudication.amount" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "An Extension", - path: "ClaimResponse.item.adjudication.extension" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.item.adjudication.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.item.adjudication.id" - }, - "category": { - name: "category", - dataType: PASClaimInquiryResponseItemAdjudicationCategory, - min: 1, - max: 1, - isArray: false, - description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", - path: "ClaimResponse.item.adjudication.category" - }, - "reviewAction": { - name: "reviewAction", - dataType: r4:Extension, - min: 0, - max: 1, - isArray: false, - description: "The details of the review action that is necessary for the authorization.", - path: "ClaimResponse.item.adjudication.extension" - }, - "value": { - name: "value", - dataType: decimal, - min: 0, - max: 1, - isArray: false, - description: "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", - path: "ClaimResponse.item.adjudication.value" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimInquiryResponseItemAdjudication record {| - *r4:BackboneElement; - - r4:CodeableConcept reason?; - r4:Money amount?; - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; - string id?; - PASClaimInquiryResponseItemAdjudicationCategory category; - r4:Extension reviewAction?; - decimal value?; -|}; - -# FHIR PASClaimInquiryResponseItemDetail datatype record. -# -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + detailSequence - A number to uniquely reference the claim detail entry. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + subDetail - A sub-detail adjudication of a simple product or service. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. -@r4:DataTypeDefinition { - name: "PASClaimInquiryResponseItemDetail", - baseType: (), - elements: { - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.item.detail.extension" - }, - "detailSequence": { - name: "detailSequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely reference the claim detail entry.", - path: "ClaimResponse.item.detail.detailSequence" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.item.detail.modifierExtension" - }, - "subDetail": { - name: "subDetail", - dataType: PASClaimInquiryResponseItemDetailSubDetail, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A sub-detail adjudication of a simple product or service.", - path: "ClaimResponse.item.detail.subDetail" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.item.detail.id" - }, - "noteNumber": { - name: "noteNumber", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The numbers associated with notes below which apply to the adjudication of this item.", - path: "ClaimResponse.item.detail.noteNumber" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimInquiryResponseItemDetail record {| - *r4:BackboneElement; - - r4:Extension[] extension?; - r4:positiveInt detailSequence; - r4:Extension[] modifierExtension?; - PASClaimInquiryResponseItemDetailSubDetail[] subDetail?; - string id?; - r4:positiveInt[] noteNumber?; -|}; - -# FHIR PASClaimInquiryResponseItemAdjudicationCategoryCoding datatype record. +# FHIR PASClaimInquiryResponseAdjudicationCategoryCoding datatype record. # # + system - The identification of the code system that defines the meaning of the symbol in the code. # + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + @r4:DataTypeDefinition { - name: "PASClaimInquiryResponseItemAdjudicationCategoryCoding", + name: "PASClaimInquiryResponseAdjudicationCategoryCoding", baseType: (), elements: { "system": { @@ -597,8 +425,9 @@ public type PASClaimInquiryResponseItemDetail record {| max: 1, isArray: false, description: "The identification of the code system that defines the meaning of the symbol in the code.", - path: "ClaimResponse.item.adjudication.category.coding.system" + path: "ClaimResponse.adjudication.category.coding.system" }, + "code": { name: "code", dataType: r4:code, @@ -606,21 +435,24 @@ public type PASClaimInquiryResponseItemDetail record {| max: 1, isArray: false, description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", - path: "ClaimResponse.item.adjudication.category.coding.code" + path: "ClaimResponse.adjudication.category.coding.code" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| + +public type PASClaimInquiryResponseAdjudicationCategoryCoding record {| *r4:Coding; r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; r4:code code = "submitted"; |}; + # FHIR PASClaimInquiryResponseInsurance datatype record. # # + coverage - Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system. @@ -631,6 +463,7 @@ public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| # + focal - A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. + @r4:DataTypeDefinition { name: "PASClaimInquiryResponseInsurance", baseType: (), @@ -644,6 +477,7 @@ public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| description: "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", path: "ClaimResponse.insurance.coverage" }, + "sequence": { name: "sequence", dataType: r4:positiveInt, @@ -653,6 +487,7 @@ public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| description: "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", path: "ClaimResponse.insurance.sequence" }, + "extension": { name: "extension", dataType: r4:Extension, @@ -662,6 +497,7 @@ public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", path: "ClaimResponse.insurance.extension" }, + "businessArrangement": { name: "businessArrangement", dataType: string, @@ -671,6 +507,7 @@ public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| description: "A business agreement number established between the provider and the insurer for special business processing purposes.", path: "ClaimResponse.insurance.businessArrangement" }, + "claimResponse": { name: "claimResponse", dataType: r4:Reference, @@ -680,6 +517,7 @@ public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| description: "The result of the adjudication of the line items for the Coverage specified in this insurance.", path: "ClaimResponse.insurance.claimResponse" }, + "focal": { name: "focal", dataType: boolean, @@ -689,6 +527,7 @@ public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| description: "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", path: "ClaimResponse.insurance.focal" }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -698,6 +537,7 @@ public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", path: "ClaimResponse.insurance.modifierExtension" }, + "id": { name: "id", dataType: string, @@ -708,82 +548,893 @@ public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| path: "ClaimResponse.insurance.id" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } + public type PASClaimInquiryResponseInsurance record {| *r4:BackboneElement; r4:Reference coverage; r4:positiveInt sequence; - r4:Extension[] extension?; + r4:Extension [] extension?; string businessArrangement?; r4:Reference claimResponse?; boolean focal; - r4:Extension[] modifierExtension?; + r4:Extension [] modifierExtension?; string id?; |}; -# FHIR PASClaimInquiryResponseItemAdjudicationCategory datatype record. + +# FHIR PASClaimInquiryResponseAdjudicationCategory datatype record. # # + coding - A reference to a code defined by a terminology system. + @r4:DataTypeDefinition { - name: "PASClaimInquiryResponseItemAdjudicationCategory", + name: "PASClaimInquiryResponseAdjudicationCategory", baseType: (), elements: { "coding": { name: "coding", - dataType: PASClaimInquiryResponseItemAdjudicationCategoryCoding, + dataType: PASClaimInquiryResponseAdjudicationCategoryCoding, min: 1, max: int:MAX_VALUE, isArray: true, description: "A reference to a code defined by a terminology system.", - path: "ClaimResponse.item.adjudication.category.coding" + path: "ClaimResponse.adjudication.category.coding" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquiryResponseItemAdjudicationCategory record {| + +public type PASClaimInquiryResponseAdjudicationCategory record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.adjudication.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.adjudication.category.coding constraint. This field must be an array containing at most one item." + } } - PASClaimInquiryResponseItemAdjudicationCategoryCoding[] coding; + PASClaimInquiryResponseAdjudicationCategoryCoding [] coding; |}; -# FHIR PASClaimInquiryResponseError datatype record. + +# PASClaimInquiryResponseIdentifierUse enum +public enum PASClaimInquiryResponseIdentifierUse { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + +# FHIR PASClaimInquiryResponseAddItemAdjudicationCategory datatype record. # -# + subDetailSequence - The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. -# + itemSequence - The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. -# + extension - An Extension -# + code - An error code, from a specified code system, which details why the claim could not be adjudicated. -# + detailSequence - The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + coding - A reference to a code defined by a terminology system. + @r4:DataTypeDefinition { - name: "PASClaimInquiryResponseError", + name: "PASClaimInquiryResponseAddItemAdjudicationCategory", baseType: (), elements: { - "subDetailSequence": { - name: "subDetailSequence", - dataType: r4:positiveInt, - min: 0, - max: 1, - isArray: false, - description: "The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", - path: "ClaimResponse.error.subDetailSequence" - }, - "itemSequence": { - name: "itemSequence", - dataType: r4:positiveInt, - min: 0, - max: 1, + "coding": { + name: "coding", + dataType: PASClaimInquiryResponseAddItemAdjudicationCategoryCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "ClaimResponse.addItem.adjudication.category.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimInquiryResponseAddItemAdjudicationCategory record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimInquiryResponseAddItemAdjudicationCategoryCoding [] coding; +|}; + + +# FHIR PASClaimInquiryResponseTotal datatype record. +# +# + amount - Monetary total amount associated with the category. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item. + +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseTotal", + baseType: (), + elements: { + "amount": { + name: "amount", + dataType: r4:Money, + min: 1, + max: 1, + isArray: false, + description: "Monetary total amount associated with the category.", + path: "ClaimResponse.total.amount" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.total.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.total.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.total.id" + }, + + "category": { + name: "category", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", + path: "ClaimResponse.total.category" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimInquiryResponseTotal record {| + *r4:BackboneElement; + + r4:Money amount; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string id?; + r4:CodeableConcept category; +|}; + + +# PASClaimInquiryResponseStatus enum +public enum PASClaimInquiryResponseStatus { + CODE_STATUS_DRAFT = "draft", + CODE_STATUS_ACTIVE = "active", + CODE_STATUS_CANCELLED = "cancelled", + CODE_STATUS_ENTERED_IN_ERROR = "entered-in-error" +} + +# FHIR PASClaimInquiryResponseItem datatype record. +# +# + adjudication - If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item. +# + itemSequence - A number to uniquely reference the claim item entries. +# + extension - An Extension +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + detail - A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. + +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseItem", + baseType: (), + elements: { + "adjudication": { + name: "adjudication", + dataType: PASClaimInquiryResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.", + path: "ClaimResponse.item.adjudication" + }, + + "itemSequence": { + name: "itemSequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely reference the claim item entries.", + path: "ClaimResponse.item.itemSequence" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "ClaimResponse.item.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.item.modifierExtension" + }, + + "detail": { + name: "detail", + dataType: PASClaimInquiryResponseItemDetail, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + path: "ClaimResponse.item.detail" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.item.id" + }, + + "noteNumber": { + name: "noteNumber", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The numbers associated with notes below which apply to the adjudication of this item.", + path: "ClaimResponse.item.noteNumber" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimInquiryResponseItem record {| + *r4:BackboneElement; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication constraint. This field must be an array containing at most one item." + } + } + PASClaimInquiryResponseItemAdjudication [] adjudication; + r4:positiveInt itemSequence; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + PASClaimInquiryResponseItemDetail [] detail?; + string id?; + r4:positiveInt [] noteNumber?; +|}; + + +# FHIR PASClaimInquiryResponseAddItemAdjudication datatype record. +# +# + reason - A code supporting the understanding of the adjudication result and explaining variance from expected amount. +# + amount - Monetary amount associated with the category. +# + extension - An Extension +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. +# + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. + +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseAddItemAdjudication", + baseType: (), + elements: { + "reason": { + name: "reason", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", + path: "ClaimResponse.addItem.adjudication.reason" + }, + + "amount": { + name: "amount", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "Monetary amount associated with the category.", + path: "ClaimResponse.addItem.adjudication.amount" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "ClaimResponse.addItem.adjudication.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.addItem.adjudication.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.addItem.adjudication.id" + }, + + "category": { + name: "category", + dataType: PASClaimInquiryResponseAddItemAdjudicationCategory, + min: 1, + max: 1, + isArray: false, + description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", + path: "ClaimResponse.addItem.adjudication.category" + }, + + "value": { + name: "value", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", + path: "ClaimResponse.addItem.adjudication.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimInquiryResponseAddItemAdjudication record {| + *r4:BackboneElement; + + r4:CodeableConcept reason?; + r4:Money amount?; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string id?; + PASClaimInquiryResponseAddItemAdjudicationCategory category; + decimal value?; +|}; + + +# FHIR PASClaimInquiryResponseAddItemDetailSubDetail datatype record. +# +# + adjudication - The adjudication results. +# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + quantity - The number of repetitions of a service or product. +# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. +# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. +# + net - The quantity times the unit price for an additional service or product or charge. +# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. + +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseAddItemDetailSubDetail", + baseType: (), + elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.addItem.detail.subDetail.adjudication" + }, + + "unitPrice": { + name: "unitPrice", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", + path: "ClaimResponse.addItem.detail.subDetail.unitPrice" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.addItem.detail.subDetail.extension" + }, + + "quantity": { + name: "quantity", + dataType: r4:Quantity, + min: 0, + max: 1, + isArray: false, + description: "The number of repetitions of a service or product.", + path: "ClaimResponse.addItem.detail.subDetail.quantity" + }, + + "modifier": { + name: "modifier", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Item typification or modifiers codes to convey additional context for the product or service.", + path: "ClaimResponse.addItem.detail.subDetail.modifier" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.addItem.detail.subDetail.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.addItem.detail.subDetail.id" + }, + + "productOrService": { + name: "productOrService", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", + path: "ClaimResponse.addItem.detail.subDetail.productOrService" + }, + + "factor": { + name: "factor", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", + path: "ClaimResponse.addItem.detail.subDetail.factor" + }, + + "net": { + name: "net", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "The quantity times the unit price for an additional service or product or charge.", + path: "ClaimResponse.addItem.detail.subDetail.net" + }, + + "noteNumber": { + name: "noteNumber", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The numbers associated with notes below which apply to the adjudication of this item.", + path: "ClaimResponse.addItem.detail.subDetail.noteNumber" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimInquiryResponseAddItemDetailSubDetail record {| + *r4:BackboneElement; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.subDetail.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.subDetail.adjudication constraint. This field must be an array containing at most one item." + } + } + international401:ClaimResponseItemAdjudication [] adjudication; + r4:Money unitPrice?; + r4:Extension [] extension?; + r4:Quantity quantity?; + r4:CodeableConcept [] modifier?; + r4:Extension [] modifierExtension?; + string id?; + r4:CodeableConcept productOrService; + decimal factor?; + r4:Money net?; + r4:positiveInt [] noteNumber?; +|}; + + +# FHIR PASClaimInquiryResponseItemAdjudication datatype record. +# +# + reason - A code supporting the understanding of the adjudication result and explaining variance from expected amount. +# + amount - Monetary amount associated with the category. +# + extension - An Extension +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. +# + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseItemAdjudication", + baseType: (), + elements: { + "reason": { + name: "reason", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", + path: "ClaimResponse.item.adjudication.reason" + }, + "amount": { + name: "amount", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "Monetary amount associated with the category.", + path: "ClaimResponse.item.adjudication.amount" + }, + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "ClaimResponse.item.adjudication.extension" + }, + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.item.adjudication.modifierExtension" + }, + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.item.adjudication.id" + }, + "category": { + name: "category", + dataType: PASClaimInquiryResponseItemAdjudicationCategory, + min: 1, + max: 1, + isArray: false, + description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", + path: "ClaimResponse.item.adjudication.category" + }, + + "value": { + name: "value", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", + path: "ClaimResponse.item.adjudication.value" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimInquiryResponseItemAdjudication record {| + *r4:BackboneElement; + + r4:CodeableConcept reason?; + r4:Money amount?; + r4:Extension[] extension?; + r4:Extension[] modifierExtension?; + string id?; + PASClaimInquiryResponseItemAdjudicationCategory category; + decimal value?; +|}; + +# FHIR PASClaimInquiryResponseItemDetail datatype record. +# +# + adjudication - The adjudication results. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + detailSequence - A number to uniquely reference the claim detail entry. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + subDetail - A sub-detail adjudication of a simple product or service. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseItemDetail", + baseType: (), + elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.item.detail.adjudication" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.item.detail.extension" + }, + "detailSequence": { + name: "detailSequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely reference the claim detail entry.", + path: "ClaimResponse.item.detail.detailSequence" + }, + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.item.detail.modifierExtension" + }, + "subDetail": { + name: "subDetail", + dataType: PASClaimInquiryResponseItemDetailSubDetail, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A sub-detail adjudication of a simple product or service.", + path: "ClaimResponse.item.detail.subDetail" + }, + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.item.detail.id" + }, + "noteNumber": { + name: "noteNumber", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The numbers associated with notes below which apply to the adjudication of this item.", + path: "ClaimResponse.item.detail.noteNumber" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimInquiryResponseItemDetail record {| + *r4:BackboneElement; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.detail.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.detail.adjudication constraint. This field must be an array containing at most one item." + } + } + international401:ClaimResponseItemAdjudication [] adjudication; + r4:Extension[] extension?; + r4:positiveInt detailSequence; + r4:Extension[] modifierExtension?; + PASClaimInquiryResponseItemDetailSubDetail[] subDetail?; + string id?; + r4:positiveInt[] noteNumber?; +|}; + +# FHIR PASClaimInquiryResponseItemAdjudicationCategoryCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseItemAdjudicationCategoryCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "ClaimResponse.item.adjudication.category.coding.system" + }, + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "ClaimResponse.item.adjudication.category.coding.code" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimInquiryResponseItemAdjudicationCategoryCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; + r4:code code = "submitted"; +|}; + + +# FHIR PASClaimInquiryResponseItemAdjudicationCategory datatype record. +# +# + coding - A reference to a code defined by a terminology system. +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseItemAdjudicationCategory", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASClaimInquiryResponseItemAdjudicationCategoryCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "ClaimResponse.item.adjudication.category.coding" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimInquiryResponseItemAdjudicationCategory record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimInquiryResponseItemAdjudicationCategoryCoding[] coding; +|}; + +# FHIR PASClaimInquiryResponseError datatype record. +# +# + subDetailSequence - The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. +# + itemSequence - The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. +# + extension - An Extension +# + code - An error code, from a specified code system, which details why the claim could not be adjudicated. +# + detailSequence - The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseError", + baseType: (), + elements: { + "subDetailSequence": { + name: "subDetailSequence", + dataType: r4:positiveInt, + min: 0, + max: 1, + isArray: false, + description: "The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", + path: "ClaimResponse.error.subDetailSequence" + }, + "itemSequence": { + name: "itemSequence", + dataType: r4:positiveInt, + min: 0, + max: 1, isArray: false, description: "The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", path: "ClaimResponse.error.itemSequence" @@ -858,11 +1509,115 @@ public enum PASClaimInquiryResponseUse { CODE_USE_CLAIM = "claim" } +# FHIR PASClaimInquiryResponseAdjudication datatype record. +# +# + reason - A code supporting the understanding of the adjudication result and explaining variance from expected amount. +# + amount - Monetary amount associated with the category. +# + extension - An Extension +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. +# + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. + +@r4:DataTypeDefinition { + name: "PASClaimInquiryResponseAdjudication", + baseType: (), + elements: { + "reason": { + name: "reason", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", + path: "ClaimResponse.adjudication.reason" + }, + + "amount": { + name: "amount", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "Monetary amount associated with the category.", + path: "ClaimResponse.adjudication.amount" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "ClaimResponse.adjudication.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.adjudication.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.adjudication.id" + }, + + "category": { + name: "category", + dataType: PASClaimInquiryResponseAdjudicationCategory, + min: 1, + max: 1, + isArray: false, + description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", + path: "ClaimResponse.adjudication.category" + }, + + "value": { + name: "value", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", + path: "ClaimResponse.adjudication.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimInquiryResponseAdjudication record {| + *r4:BackboneElement; + + r4:CodeableConcept reason?; + r4:Money amount?; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string id?; + PASClaimInquiryResponseAdjudicationCategory category; + decimal value?; +|}; + + # FHIR PASClaimInquiryResponseAddItem datatype record. # # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + quantity - The number of repetitions of a service or product. +# + extension - An Extension +# + quantity - The comparator is not used on a SimpleQuantity # + programCode - Identifies the program under which this may be recovered. # + modifier - Item typification or modifiers codes to convey additional context for the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). @@ -871,6 +1626,7 @@ public enum PASClaimInquiryResponseUse { # + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. # + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. # + servicedPeriod - The date or dates when the service or product was supplied, performed or completed. +# + adjudication - The adjudication results. # + itemSequence - Claim items which this service line is intended to replace. # + bodySite - Physical service site on the patient (limb, tooth, etc.). # + locationCodeableConcept - Where the product or service was provided. @@ -902,7 +1658,7 @@ public enum PASClaimInquiryResponseUse { min: 0, max: int:MAX_VALUE, isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + description: "An Extension", path: "ClaimResponse.addItem.extension" }, "quantity": { @@ -911,7 +1667,7 @@ public enum PASClaimInquiryResponseUse { min: 0, max: 1, isArray: false, - description: "The number of repetitions of a service or product.", + description: "The comparator is not used on a SimpleQuantity", path: "ClaimResponse.addItem.quantity" }, "programCode": { @@ -986,11 +1742,22 @@ public enum PASClaimInquiryResponseUse { description: "The date or dates when the service or product was supplied, performed or completed.", path: "ClaimResponse.addItem.serviced[x]" }, + + "adjudication": { + name: "adjudication", + dataType: PASClaimInquiryResponseAddItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.addItem.adjudication" + }, + "itemSequence": { name: "itemSequence", dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, + min: 1, + max: 1, isArray: true, description: "Claim items which this service line is intended to replace.", path: "ClaimResponse.addItem.itemSequence" @@ -1114,7 +1881,28 @@ public type PASClaimInquiryResponseAddItem record {| r4:CodeableConcept productOrService; r4:positiveInt[] noteNumber?; r4:Period servicedPeriod?; - r4:positiveInt[] itemSequence?; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication constraint. This field must be an array containing at most one item." + } + } + PASClaimInquiryResponseAddItemAdjudication [] adjudication; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.itemSequence constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.itemSequence constraint. This field must be an array containing at most one item." + } + } + r4:positiveInt [] itemSequence; r4:CodeableConcept bodySite?; r4:CodeableConcept locationCodeableConcept?; r4:Reference[] provider?; @@ -1128,61 +1916,34 @@ public type PASClaimInquiryResponseAddItem record {| r4:Money net?; |}; -# FHIR PASClaimInquiryResponseTotal datatype record. + +# FHIR PASClaimInquiryResponseAddItemAdjudicationCategoryCoding datatype record. # -# + amount - Monetary total amount associated with the category. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + category - A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item. +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + @r4:DataTypeDefinition { - name: "PASClaimInquiryResponseTotal", + name: "PASClaimInquiryResponseAddItemAdjudicationCategoryCoding", baseType: (), elements: { - "amount": { - name: "amount", - dataType: r4:Money, + "system": { + name: "system", + dataType: r4:uri, min: 1, max: 1, isArray: false, - description: "Monetary total amount associated with the category.", - path: "ClaimResponse.total.amount" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.total.extension" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.total.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.total.id" + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "ClaimResponse.addItem.adjudication.category.coding.system" }, - "category": { - name: "category", - dataType: r4:CodeableConcept, + + "code": { + name: "code", + dataType: r4:code, min: 1, max: 1, isArray: false, - description: "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", - path: "ClaimResponse.total.category" + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "ClaimResponse.addItem.adjudication.category.coding.code" } }, serializers: { @@ -1190,14 +1951,12 @@ public type PASClaimInquiryResponseAddItem record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimInquiryResponseTotal record {| - *r4:BackboneElement; - r4:Money amount; - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; - string id?; - r4:CodeableConcept category; +public type PASClaimInquiryResponseAddItemAdjudicationCategoryCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; + r4:code code = "submitted"; |}; # FHIR PASClaimInquiryResponsePayment datatype record. @@ -1318,6 +2077,7 @@ public type PASClaimInquiryResponsePayment record {| # FHIR PASClaimInquiryResponseItemDetailSubDetail datatype record. # +# + adjudication - The adjudication results. # + subDetailSequence - A number to uniquely reference the claim sub-detail entry. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). @@ -1327,6 +2087,16 @@ public type PASClaimInquiryResponsePayment record {| name: "PASClaimInquiryResponseItemDetailSubDetail", baseType: (), elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.item.detail.subDetail.adjudication" + }, + "subDetailSequence": { name: "subDetailSequence", dataType: r4:positiveInt, @@ -1381,6 +2151,7 @@ public type PASClaimInquiryResponsePayment record {| public type PASClaimInquiryResponseItemDetailSubDetail record {| *r4:BackboneElement; + international401:ClaimResponseItemAdjudication [] adjudication?; r4:positiveInt subDetailSequence; r4:Extension[] extension?; r4:Extension[] modifierExtension?; @@ -1388,13 +2159,6 @@ public type PASClaimInquiryResponseItemDetailSubDetail record {| r4:positiveInt[] noteNumber?; |}; -# PASClaimInquiryResponseStatus enum -public enum PASClaimInquiryResponseStatus { - CODE_STATUS_DRAFT = "draft", - CODE_STATUS_ACTIVE = "active", - CODE_STATUS_CANCELLED = "cancelled", - CODE_STATUS_ENTERED_IN_ERROR = "entered-in-error" -} # FHIR PASClaimInquiryResponseProcessNote datatype record. # @@ -1492,6 +2256,7 @@ public type PASClaimInquiryResponseProcessNote record {| # FHIR PASClaimInquiryResponseAddItemDetail datatype record. # +# + adjudication - The adjudication results. # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + quantity - The number of repetitions of a service or product. @@ -1507,6 +2272,16 @@ public type PASClaimInquiryResponseProcessNote record {| name: "PASClaimInquiryResponseAddItemDetail", baseType: (), elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.addItem.detail.adjudication" + }, + "unitPrice": { name: "unitPrice", dataType: r4:Money, @@ -1615,6 +2390,17 @@ public type PASClaimInquiryResponseProcessNote record {| public type PASClaimInquiryResponseAddItemDetail record {| *r4:BackboneElement; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.adjudication constraint. This field must be an array containing at most one item." + } + } + international401:ClaimResponseItemAdjudication [] adjudication; r4:Money unitPrice?; r4:Extension[] extension?; r4:Quantity quantity?; @@ -1636,230 +2422,6 @@ public enum PASClaimInquiryResponseOutcome { CODE_OUTCOME_PARTIAL = "partial" } -# FHIR PASClaimInquiryResponseItem datatype record. -# -# + adjudication - If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item. -# + itemSequence - A number to uniquely reference the claim item entries. -# + extension - An Extension -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + detail - A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. -@r4:DataTypeDefinition { - name: "PASClaimInquiryResponseItem", - baseType: (), - elements: { - "adjudication": { - name: "adjudication", - dataType: PASClaimInquiryResponseItemAdjudication, - min: 1, - max: int:MAX_VALUE, - isArray: true, - description: "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.", - path: "ClaimResponse.item.adjudication" - }, - "itemSequence": { - name: "itemSequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely reference the claim item entries.", - path: "ClaimResponse.item.itemSequence" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "An Extension", - path: "ClaimResponse.item.extension" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.item.modifierExtension" - }, - "detail": { - name: "detail", - dataType: PASClaimInquiryResponseItemDetail, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", - path: "ClaimResponse.item.detail" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.item.id" - }, - "noteNumber": { - name: "noteNumber", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The numbers associated with notes below which apply to the adjudication of this item.", - path: "ClaimResponse.item.noteNumber" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimInquiryResponseItem record {| - *r4:BackboneElement; - - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; - r4:positiveInt[] noteNumber?; - @constraint:Array { - minLength: 1 - } - PASClaimInquiryResponseItemAdjudication[] adjudication; - r4:positiveInt itemSequence; - PASClaimInquiryResponseItemDetail[] detail?; - string id?; -|}; - -# FHIR PASClaimInquiryResponseAddItemDetailSubDetail datatype record. -# -# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + quantity - The number of repetitions of a service or product. -# + modifier - Item typification or modifiers codes to convey additional context for the product or service. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. -# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. -# + net - The quantity times the unit price for an additional service or product or charge. -# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. -@r4:DataTypeDefinition { - name: "PASClaimInquiryResponseAddItemDetailSubDetail", - baseType: (), - elements: { - "unitPrice": { - name: "unitPrice", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - path: "ClaimResponse.addItem.detail.subDetail.unitPrice" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.addItem.detail.subDetail.extension" - }, - "quantity": { - name: "quantity", - dataType: r4:Quantity, - min: 0, - max: 1, - isArray: false, - description: "The number of repetitions of a service or product.", - path: "ClaimResponse.addItem.detail.subDetail.quantity" - }, - "modifier": { - name: "modifier", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Item typification or modifiers codes to convey additional context for the product or service.", - path: "ClaimResponse.addItem.detail.subDetail.modifier" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.addItem.detail.subDetail.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.addItem.detail.subDetail.id" - }, - "productOrService": { - name: "productOrService", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - path: "ClaimResponse.addItem.detail.subDetail.productOrService" - }, - "factor": { - name: "factor", - dataType: decimal, - min: 0, - max: 1, - isArray: false, - description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - path: "ClaimResponse.addItem.detail.subDetail.factor" - }, - "net": { - name: "net", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "The quantity times the unit price for an additional service or product or charge.", - path: "ClaimResponse.addItem.detail.subDetail.net" - }, - "noteNumber": { - name: "noteNumber", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The numbers associated with notes below which apply to the adjudication of this item.", - path: "ClaimResponse.addItem.detail.subDetail.noteNumber" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimInquiryResponseAddItemDetailSubDetail record {| - *r4:BackboneElement; - - r4:Money unitPrice?; - r4:Extension[] extension?; - r4:Quantity quantity?; - r4:CodeableConcept[] modifier?; - r4:Extension[] modifierExtension?; - string id?; - r4:CodeableConcept productOrService; - decimal factor?; - r4:Money net?; - r4:positiveInt[] noteNumber?; -|}; - # PASClaimInquiryResponseProcessNoteType enum public enum PASClaimInquiryResponseProcessNoteType { CODE_TYPE_PRINT = "print", diff --git a/davincipas/resource_pasclaim_response.bal b/davincipas/resource_pasclaim_response.bal index 43e6e6a8..0e505cd8 100644 --- a/davincipas/resource_pasclaim_response.bal +++ b/davincipas/resource_pasclaim_response.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,16 +13,19 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. import ballerina/constraint; import ballerinax/health.fhir.r4; +import ballerinax/health.fhir.r4.international401; public const string PROFILE_BASE_PASCLAIMRESPONSE = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claimresponse"; public const RESOURCE_NAME_PASCLAIMRESPONSE = "ClaimResponse"; +public type PASClaimResponseExtensions (r4:Extension | ExtensionEpsdtIndicator | ExtensionNursingHomeLevelOfCare | ExtensionProductOrServiceCodeEnd | ExtensionRevenueUnitRateLimit ); + # FHIR PASClaimResponse resource record. # # + resourceType - The type of the resource describes @@ -37,6 +40,7 @@ public const RESOURCE_NAME_PASCLAIMRESPONSE = "ClaimResponse"; # + 'error - Errors encountered during the processing of the adjudication. # + 'type - A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service. # + processNote - A note that describes or explains adjudication results in a human readable form. +# + adjudication - The adjudication results which are presented at the header level rather than at the line-item or add-item levels. # + addItem - The first-tier service adjudications for payor added product or service lines. # + total - Categorized monetary totals for the adjudication. # + fundsReserve - A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom. @@ -76,7 +80,7 @@ public const RESOURCE_NAME_PASCLAIMRESPONSE = "ClaimResponse"; "request" : { name: "request", dataType: r4:Reference, - min: 0, + min: 1, max: 1, isArray: false, path: "ClaimResponse.request" @@ -157,6 +161,16 @@ public const RESOURCE_NAME_PASCLAIMRESPONSE = "ClaimResponse"; isArray: true, path: "ClaimResponse.processNote" }, + + "adjudication" : { + name: "adjudication", + dataType: PASClaimResponseAdjudication, + min: 0, + max: int:MAX_VALUE, + isArray: true, + path: "ClaimResponse.adjudication" + }, + "addItem" : { name: "addItem", dataType: PASClaimResponseAddItem, @@ -358,7 +372,7 @@ public type PASClaimResponse record {| RESOURCE_NAME_PASCLAIMRESPONSE resourceType = RESOURCE_NAME_PASCLAIMRESPONSE; PASClaimResponseInsurance[] insurance?; - r4:Reference request?; + r4:Reference request; r4:Extension[] extension?; PASClaimResponseUse use; r4:Extension[] modifierExtension?; @@ -368,6 +382,7 @@ public type PASClaimResponse record {| PASClaimResponseError[] 'error?; r4:CodeableConcept 'type; PASClaimResponseProcessNote[] processNote?; + PASClaimResponseAdjudication [] adjudication?; PASClaimResponseAddItem[] addItem?; PASClaimResponseTotal[] total?; r4:CodeableConcept fundsReserve?; @@ -488,6 +503,16 @@ public type PASClaimResponseError record {| string id?; |}; + +# PASClaimResponseIdentifierUse enum +public enum PASClaimResponseIdentifierUse { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + # PASClaimResponseUse enum public enum PASClaimResponseUse { CODE_USE_PREDETERMINATION = "predetermination", @@ -495,83 +520,72 @@ public enum PASClaimResponseUse { CODE_USE_CLAIM = "claim" } -# FHIR PASClaimResponseItemAdjudicationCategoryCoding datatype record. +# FHIR PASClaimResponseAddItemAdjudicationCategory datatype record. # -# + system - The identification of the code system that defines the meaning of the symbol in the code. -# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). +# + coding - A reference to a code defined by a terminology system. + @r4:DataTypeDefinition { - name: "PASClaimResponseItemAdjudicationCategoryCoding", + name: "PASClaimResponseAddItemAdjudicationCategory", baseType: (), elements: { - "system": { - name: "system", - dataType: r4:uri, - min: 1, - max: 1, - isArray: false, - description: "The identification of the code system that defines the meaning of the symbol in the code.", - path: "ClaimResponse.item.adjudication.category.coding.system" - }, - "code": { - name: "code", - dataType: r4:code, + "coding": { + name: "coding", + dataType: PASClaimResponseAddItemAdjudicationCategoryCoding, min: 1, - max: 1, - isArray: false, - description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", - path: "ClaimResponse.item.adjudication.category.coding.code" + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "ClaimResponse.addItem.adjudication.category.coding" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseItemAdjudicationCategoryCoding record {| - *r4:Coding; - r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; - r4:code code = "submitted"; +public type PASClaimResponseAddItemAdjudicationCategory record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimResponseAddItemAdjudicationCategoryCoding [] coding; |}; -# FHIR PASClaimResponseAddItem datatype record. + +# FHIR PASClaimResponseItemDetail datatype record. # -# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. +# + adjudication - The adjudication results. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + quantity - The number of repetitions of a service or product. -# + programCode - Identifies the program under which this may be recovered. -# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + detailSequence - A number to uniquely reference the claim detail entry. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + subdetailSequence - The sequence number of the sub-details within the details within the claim item which this line is intended to replace. -# + locationAddress - Where the product or service was provided. -# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. -# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. -# + servicedPeriod - The date or dates when the service or product was supplied, performed or completed. -# + itemSequence - Claim items which this service line is intended to replace. -# + bodySite - Physical service site on the patient (limb, tooth, etc.). -# + locationCodeableConcept - Where the product or service was provided. -# + provider - The providers who are authorized for the services rendered to the patient. -# + detailSequence - The sequence number of the details within the claim item which this line is intended to replace. -# + subSite - A region or surface of the bodySite, e.g. limb region or tooth surface(s). -# + detail - The second-tier service adjudications for payor added services. +# + subDetail - A sub-detail adjudication of a simple product or service. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + locationReference - Where the product or service was provided. -# + servicedDate - The date or dates when the service or product was supplied, performed or completed. -# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. -# + net - The quantity times the unit price for an additional service or product or charge. +# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. + @r4:DataTypeDefinition { - name: "PASClaimResponseAddItem", + name: "PASClaimResponseItemDetail", baseType: (), elements: { - "unitPrice": { - name: "unitPrice", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - path: "ClaimResponse.addItem.unitPrice" + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.item.detail.adjudication" }, + "extension": { name: "extension", dataType: r4:Extension, @@ -579,35 +593,19 @@ public type PASClaimResponseItemAdjudicationCategoryCoding record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.addItem.extension" + path: "ClaimResponse.item.detail.extension" }, - "quantity": { - name: "quantity", - dataType: r4:Quantity, - min: 0, + + "detailSequence": { + name: "detailSequence", + dataType: r4:positiveInt, + min: 1, max: 1, isArray: false, - description: "The number of repetitions of a service or product.", - path: "ClaimResponse.addItem.quantity" - }, - "programCode": { - name: "programCode", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Identifies the program under which this may be recovered.", - path: "ClaimResponse.addItem.programCode" - }, - "modifier": { - name: "modifier", - dataType: r4:CodeableConcept, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Item typification or modifiers codes to convey additional context for the product or service.", - path: "ClaimResponse.addItem.modifier" + description: "A number to uniquely reference the claim detail entry.", + path: "ClaimResponse.item.detail.detailSequence" }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -615,35 +613,29 @@ public type PASClaimResponseItemAdjudicationCategoryCoding record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.addItem.modifierExtension" + path: "ClaimResponse.item.detail.modifierExtension" }, - "subdetailSequence": { - name: "subdetailSequence", - dataType: r4:positiveInt, + + "subDetail": { + name: "subDetail", + dataType: PASClaimResponseItemDetailSubDetail, min: 0, max: int:MAX_VALUE, isArray: true, - description: "The sequence number of the sub-details within the details within the claim item which this line is intended to replace.", - path: "ClaimResponse.addItem.subdetailSequence" + description: "A sub-detail adjudication of a simple product or service.", + path: "ClaimResponse.item.detail.subDetail" }, - "locationAddress": { - name: "locationAddress", - dataType: r4:Address, + + "id": { + name: "id", + dataType: string, min: 0, max: 1, isArray: false, - description: "Where the product or service was provided.", - path: "ClaimResponse.addItem.location[x]" - }, - "productOrService": { - name: "productOrService", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - path: "ClaimResponse.addItem.productOrService" + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.item.detail.id" }, + "noteNumber": { name: "noteNumber", dataType: r4:positiveInt, @@ -651,61 +643,823 @@ public type PASClaimResponseItemAdjudicationCategoryCoding record {| max: int:MAX_VALUE, isArray: true, description: "The numbers associated with notes below which apply to the adjudication of this item.", - path: "ClaimResponse.addItem.noteNumber" - }, - "servicedPeriod": { - name: "servicedPeriod", - dataType: r4:Period, - min: 0, - max: 1, - isArray: false, - description: "The date or dates when the service or product was supplied, performed or completed.", - path: "ClaimResponse.addItem.serviced[x]" - }, - "itemSequence": { - name: "itemSequence", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "Claim items which this service line is intended to replace.", - path: "ClaimResponse.addItem.itemSequence" + path: "ClaimResponse.item.detail.noteNumber" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseItemDetail record {| + *r4:BackboneElement; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.detail.adjudication constraint. This field must be an array containing at least one item." }, - "bodySite": { - name: "bodySite", + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.detail.adjudication constraint. This field must be an array containing at most one item." + } + } + international401:ClaimResponseItemAdjudication [] adjudication; + r4:Extension [] extension?; + r4:positiveInt detailSequence; + r4:Extension [] modifierExtension?; + PASClaimResponseItemDetailSubDetail [] subDetail?; + string id?; + r4:positiveInt [] noteNumber?; +|}; + + +# FHIR PASClaimResponseItemAdjudication datatype record. +# +# + reason - A code supporting the understanding of the adjudication result and explaining variance from expected amount. +# + amount - Monetary amount associated with the category. +# + extension - An Extension +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. +# + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. + +@r4:DataTypeDefinition { + name: "PASClaimResponseItemAdjudication", + baseType: (), + elements: { + "reason": { + name: "reason", dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "Physical service site on the patient (limb, tooth, etc.).", - path: "ClaimResponse.addItem.bodySite" + description: "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", + path: "ClaimResponse.item.adjudication.reason" }, - "locationCodeableConcept": { - name: "locationCodeableConcept", - dataType: r4:CodeableConcept, + + "amount": { + name: "amount", + dataType: r4:Money, min: 0, max: 1, isArray: false, - description: "Where the product or service was provided.", - path: "ClaimResponse.addItem.location[x]" + description: "Monetary amount associated with the category.", + path: "ClaimResponse.item.adjudication.amount" }, - "provider": { - name: "provider", - dataType: r4:Reference, + + "extension": { + name: "extension", + dataType: r4:Extension, min: 0, max: int:MAX_VALUE, isArray: true, - description: "The providers who are authorized for the services rendered to the patient.", - path: "ClaimResponse.addItem.provider" + description: "An Extension", + path: "ClaimResponse.item.adjudication.extension" }, - "detailSequence": { - name: "detailSequence", - dataType: r4:positiveInt, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, min: 0, max: int:MAX_VALUE, isArray: true, - description: "The sequence number of the details within the claim item which this line is intended to replace.", - path: "ClaimResponse.addItem.detailSequence" + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.item.adjudication.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.item.adjudication.id" + }, + + "category": { + name: "category", + dataType: PASClaimResponseItemAdjudicationCategory, + min: 1, + max: 1, + isArray: false, + description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", + path: "ClaimResponse.item.adjudication.category" + }, + + "value": { + name: "value", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", + path: "ClaimResponse.item.adjudication.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseItemAdjudication record {| + *r4:BackboneElement; + + r4:CodeableConcept reason?; + r4:Money amount?; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string id?; + PASClaimResponseItemAdjudicationCategory category; + decimal value?; +|}; + + +# PASClaimResponseProcessNoteType enum +public enum PASClaimResponseProcessNoteType { + CODE_TYPE_PRINT = "print", + CODE_TYPE_DISPLAY = "display", + CODE_TYPE_PRINTOPER = "printoper" +} + +# FHIR PASClaimResponseAddItemAdjudication datatype record. +# +# + reason - A code supporting the understanding of the adjudication result and explaining variance from expected amount. +# + amount - Monetary amount associated with the category. +# + extension - An Extension +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. +# + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. + +@r4:DataTypeDefinition { + name: "PASClaimResponseAddItemAdjudication", + baseType: (), + elements: { + "reason": { + name: "reason", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", + path: "ClaimResponse.addItem.adjudication.reason" + }, + + "amount": { + name: "amount", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "Monetary amount associated with the category.", + path: "ClaimResponse.addItem.adjudication.amount" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "ClaimResponse.addItem.adjudication.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.addItem.adjudication.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.addItem.adjudication.id" + }, + + "category": { + name: "category", + dataType: PASClaimResponseAddItemAdjudicationCategory, + min: 1, + max: 1, + isArray: false, + description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", + path: "ClaimResponse.addItem.adjudication.category" + }, + + "value": { + name: "value", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", + path: "ClaimResponse.addItem.adjudication.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseAddItemAdjudication record {| + *r4:BackboneElement; + + r4:CodeableConcept reason?; + r4:Money amount?; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string id?; + PASClaimResponseAddItemAdjudicationCategory category; + decimal value?; +|}; + + +# PASClaimResponseOutcome enum +public enum PASClaimResponseOutcome { + CODE_OUTCOME_QUEUED = "queued", + CODE_OUTCOME_COMPLETE = "complete", + CODE_OUTCOME_ERROR = "error", + CODE_OUTCOME_PARTIAL = "partial" +} + +# FHIR PASClaimResponseAddItemAdjudicationCategoryCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASClaimResponseAddItemAdjudicationCategoryCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "ClaimResponse.addItem.adjudication.category.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "ClaimResponse.addItem.adjudication.category.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseAddItemAdjudicationCategoryCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; + r4:code code = "submitted"; +|}; + + +# FHIR PASClaimResponseTotal datatype record. +# +# + amount - Monetary total amount associated with the category. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item. + +@r4:DataTypeDefinition { + name: "PASClaimResponseTotal", + baseType: (), + elements: { + "amount": { + name: "amount", + dataType: r4:Money, + min: 1, + max: 1, + isArray: false, + description: "Monetary total amount associated with the category.", + path: "ClaimResponse.total.amount" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.total.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.total.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.total.id" + }, + + "category": { + name: "category", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", + path: "ClaimResponse.total.category" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseTotal record {| + *r4:BackboneElement; + + r4:Money amount; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string id?; + r4:CodeableConcept category; +|}; + + +# FHIR PASClaimResponseAdjudicationCategory datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASClaimResponseAdjudicationCategory", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASClaimResponseAdjudicationCategoryCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "ClaimResponse.adjudication.category.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseAdjudicationCategory record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.adjudication.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.adjudication.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimResponseAdjudicationCategoryCoding [] coding; +|}; + + +# FHIR PASClaimResponseAdjudicationCategoryCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASClaimResponseAdjudicationCategoryCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "ClaimResponse.adjudication.category.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "ClaimResponse.adjudication.category.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseAdjudicationCategoryCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; + r4:code code = "submitted"; +|}; + + +# FHIR PASClaimResponsePayment datatype record. +# +# + date - Estimated date the payment will be issued or the actual issue date of payment. +# + identifier - Issuer's unique identifier for the payment instrument. +# + adjustmentReason - Reason for the payment adjustment. +# + amount - Benefits payable less any payment adjustment. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + adjustment - Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - Whether this represents partial or complete payment of the benefits payable. + +@r4:DataTypeDefinition { + name: "PASClaimResponsePayment", + baseType: (), + elements: { + "date": { + name: "date", + dataType: r4:date, + min: 0, + max: 1, + isArray: false, + description: "Estimated date the payment will be issued or the actual issue date of payment.", + path: "ClaimResponse.payment.date" + }, + + "identifier": { + name: "identifier", + dataType: r4:Identifier, + min: 0, + max: 1, + isArray: false, + description: "Issuer's unique identifier for the payment instrument.", + path: "ClaimResponse.payment.identifier" + }, + + "adjustmentReason": { + name: "adjustmentReason", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Reason for the payment adjustment.", + path: "ClaimResponse.payment.adjustmentReason" + }, + + "amount": { + name: "amount", + dataType: r4:Money, + min: 1, + max: 1, + isArray: false, + description: "Benefits payable less any payment adjustment.", + path: "ClaimResponse.payment.amount" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.payment.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.payment.modifierExtension" + }, + + "adjustment": { + name: "adjustment", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", + path: "ClaimResponse.payment.adjustment" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.payment.id" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "Whether this represents partial or complete payment of the benefits payable.", + path: "ClaimResponse.payment.type" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponsePayment record {| + *r4:BackboneElement; + + r4:date date?; + r4:Identifier identifier?; + r4:CodeableConcept adjustmentReason?; + r4:Money amount; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + r4:Money adjustment?; + string id?; + r4:CodeableConcept 'type; +|}; + + +# FHIR PASClaimResponseItemAdjudicationCategoryCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). +@r4:DataTypeDefinition { + name: "PASClaimResponseItemAdjudicationCategoryCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "ClaimResponse.item.adjudication.category.coding.system" + }, + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "ClaimResponse.item.adjudication.category.coding.code" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimResponseItemAdjudicationCategoryCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; + r4:code code = "submitted"; +|}; + +# FHIR PASClaimResponseAddItem datatype record. +# +# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. +# + extension - An Extension +# + quantity - The comparator is not used on a SimpleQuantity +# + programCode - Identifies the program under which this may be recovered. +# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + subdetailSequence - The sequence number of the sub-details within the details within the claim item which this line is intended to replace. +# + locationAddress - Where the product or service was provided. +# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. +# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. +# + servicedPeriod - The date or dates when the service or product was supplied, performed or completed. +# + adjudication - The adjudication results. +# + itemSequence - Claim items which this service line is intended to replace. +# + bodySite - Physical service site on the patient (limb, tooth, etc.). +# + locationCodeableConcept - Where the product or service was provided. +# + provider - The providers who are authorized for the services rendered to the patient. +# + detailSequence - The sequence number of the details within the claim item which this line is intended to replace. +# + subSite - A region or surface of the bodySite, e.g. limb region or tooth surface(s). +# + detail - The second-tier service adjudications for payor added services. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + locationReference - Where the product or service was provided. +# + servicedDate - The date or dates when the service or product was supplied, performed or completed. +# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. +# + net - The quantity times the unit price for an additional service or product or charge. +@r4:DataTypeDefinition { + name: "PASClaimResponseAddItem", + baseType: (), + elements: { + "unitPrice": { + name: "unitPrice", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", + path: "ClaimResponse.addItem.unitPrice" + }, + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "ClaimResponse.addItem.extension" + }, + "quantity": { + name: "quantity", + dataType: r4:Quantity, + min: 0, + max: 1, + isArray: false, + description: "The comparator is not used on a SimpleQuantity", + path: "ClaimResponse.addItem.quantity" + }, + "programCode": { + name: "programCode", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Identifies the program under which this may be recovered.", + path: "ClaimResponse.addItem.programCode" + }, + "modifier": { + name: "modifier", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Item typification or modifiers codes to convey additional context for the product or service.", + path: "ClaimResponse.addItem.modifier" + }, + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.addItem.modifierExtension" + }, + "subdetailSequence": { + name: "subdetailSequence", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The sequence number of the sub-details within the details within the claim item which this line is intended to replace.", + path: "ClaimResponse.addItem.subdetailSequence" + }, + "locationAddress": { + name: "locationAddress", + dataType: r4:Address, + min: 0, + max: 1, + isArray: false, + description: "Where the product or service was provided.", + path: "ClaimResponse.addItem.location[x]" + }, + "productOrService": { + name: "productOrService", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", + path: "ClaimResponse.addItem.productOrService" + }, + "noteNumber": { + name: "noteNumber", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The numbers associated with notes below which apply to the adjudication of this item.", + path: "ClaimResponse.addItem.noteNumber" + }, + "servicedPeriod": { + name: "servicedPeriod", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "The date or dates when the service or product was supplied, performed or completed.", + path: "ClaimResponse.addItem.serviced[x]" + }, + + "adjudication": { + name: "adjudication", + dataType: PASClaimResponseAddItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.addItem.adjudication" + }, + + "itemSequence": { + name: "itemSequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: true, + description: "Claim items which this service line is intended to replace.", + path: "ClaimResponse.addItem.itemSequence" + }, + "bodySite": { + name: "bodySite", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Physical service site on the patient (limb, tooth, etc.).", + path: "ClaimResponse.addItem.bodySite" + }, + "locationCodeableConcept": { + name: "locationCodeableConcept", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "Where the product or service was provided.", + path: "ClaimResponse.addItem.location[x]" + }, + "provider": { + name: "provider", + dataType: r4:Reference, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The providers who are authorized for the services rendered to the patient.", + path: "ClaimResponse.addItem.provider" + }, + "detailSequence": { + name: "detailSequence", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The sequence number of the details within the claim item which this line is intended to replace.", + path: "ClaimResponse.addItem.detailSequence" }, "subSite": { name: "subSite", @@ -790,7 +1544,28 @@ public type PASClaimResponseAddItem record {| r4:CodeableConcept productOrService; r4:positiveInt[] noteNumber?; r4:Period servicedPeriod?; - r4:positiveInt[] itemSequence?; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication constraint. This field must be an array containing at most one item." + } + } + PASClaimResponseAddItemAdjudication [] adjudication; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.itemSequence constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.itemSequence constraint. This field must be an array containing at most one item." + } + } + r4:positiveInt [] itemSequence; r4:CodeableConcept bodySite?; r4:CodeableConcept locationCodeableConcept?; r4:Reference[] provider?; @@ -799,96 +1574,15 @@ public type PASClaimResponseAddItem record {| PASClaimResponseAddItemDetail[] detail?; string id?; r4:Reference locationReference?; - r4:date servicedDate?; - decimal factor?; - r4:Money net?; -|}; - -# FHIR PASClaimResponseItemDetail datatype record. -# -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + detailSequence - A number to uniquely reference the claim detail entry. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + subDetail - A sub-detail adjudication of a simple product or service. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. -@r4:DataTypeDefinition { - name: "PASClaimResponseItemDetail", - baseType: (), - elements: { - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.item.detail.extension" - }, - "detailSequence": { - name: "detailSequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely reference the claim detail entry.", - path: "ClaimResponse.item.detail.detailSequence" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.item.detail.modifierExtension" - }, - "subDetail": { - name: "subDetail", - dataType: PASClaimResponseItemDetailSubDetail, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A sub-detail adjudication of a simple product or service.", - path: "ClaimResponse.item.detail.subDetail" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.item.detail.id" - }, - "noteNumber": { - name: "noteNumber", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The numbers associated with notes below which apply to the adjudication of this item.", - path: "ClaimResponse.item.detail.noteNumber" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimResponseItemDetail record {| - *r4:BackboneElement; - - r4:Extension[] extension?; - r4:positiveInt detailSequence; - r4:Extension[] modifierExtension?; - PASClaimResponseItemDetailSubDetail[] subDetail?; - string id?; - r4:positiveInt[] noteNumber?; + r4:date servicedDate?; + decimal factor?; + r4:Money net?; |}; + # FHIR PASClaimResponseAddItemDetail datatype record. # +# + adjudication - The adjudication results. # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + quantity - The number of repetitions of a service or product. @@ -904,6 +1598,16 @@ public type PASClaimResponseItemDetail record {| name: "PASClaimResponseAddItemDetail", baseType: (), elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.addItem.detail.adjudication" + }, + "unitPrice": { name: "unitPrice", dataType: r4:Money, @@ -1012,6 +1716,17 @@ public type PASClaimResponseItemDetail record {| public type PASClaimResponseAddItemDetail record {| *r4:BackboneElement; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.adjudication constraint. This field must be an array containing at most one item." + } + } + international401:ClaimResponseItemAdjudication [] adjudication; r4:Money unitPrice?; r4:Extension[] extension?; r4:Quantity quantity?; @@ -1041,7 +1756,7 @@ public type PASClaimResponseAddItemDetail record {| "number": { name: "number", dataType: r4:positiveInt, - min: 0, + min: 1, max: 1, isArray: false, description: "A number to uniquely identify a note entry.", @@ -1110,7 +1825,7 @@ public type PASClaimResponseAddItemDetail record {| public type PASClaimResponseProcessNote record {| *r4:BackboneElement; - r4:positiveInt number?; + r4:positiveInt number; r4:Extension[] extension?; r4:Extension[] modifierExtension?; r4:CodeableConcept language?; @@ -1121,6 +1836,7 @@ public type PASClaimResponseProcessNote record {| # FHIR PASClaimResponseAddItemDetailSubDetail datatype record. # +# + adjudication - The adjudication results. # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + quantity - The number of repetitions of a service or product. @@ -1135,6 +1851,16 @@ public type PASClaimResponseProcessNote record {| name: "PASClaimResponseAddItemDetailSubDetail", baseType: (), elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.addItem.detail.subDetail.adjudication" + }, + "unitPrice": { name: "unitPrice", dataType: r4:Money, @@ -1234,6 +1960,17 @@ public type PASClaimResponseProcessNote record {| public type PASClaimResponseAddItemDetailSubDetail record {| *r4:BackboneElement; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.subDetail.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.subDetail.adjudication constraint. This field must be an array containing at most one item." + } + } + international401:ClaimResponseItemAdjudication [] adjudication; r4:Money unitPrice?; r4:Extension[] extension?; r4:Quantity quantity?; @@ -1248,6 +1985,7 @@ public type PASClaimResponseAddItemDetailSubDetail record {| # FHIR PASClaimResponseItemDetailSubDetail datatype record. # +# + adjudication - The adjudication results. # + subDetailSequence - A number to uniquely reference the claim sub-detail entry. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). @@ -1257,6 +1995,16 @@ public type PASClaimResponseAddItemDetailSubDetail record {| name: "PASClaimResponseItemDetailSubDetail", baseType: (), elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.item.detail.subDetail.adjudication" + }, + "subDetailSequence": { name: "subDetailSequence", dataType: r4:positiveInt, @@ -1311,6 +2059,7 @@ public type PASClaimResponseAddItemDetailSubDetail record {| public type PASClaimResponseItemDetailSubDetail record {| *r4:BackboneElement; + international401:ClaimResponseItemAdjudication [] adjudication?; r4:positiveInt subDetailSequence; r4:Extension[] extension?; r4:Extension[] modifierExtension?; @@ -1352,12 +2101,20 @@ public type PASClaimResponseItemAdjudicationCategory record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimResponseItemAdjudicationCategoryCoding[] coding; |}; -# FHIR PASClaimResponseItemAdjudication datatype record. + +# FHIR PASClaimResponseAdjudication datatype record. # # + reason - A code supporting the understanding of the adjudication result and explaining variance from expected amount. # + amount - Monetary amount associated with the category. @@ -1365,10 +2122,9 @@ public type PASClaimResponseItemAdjudicationCategory record {| # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. # + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. -# + reviewAction - The details of the review action that is necessary for the authorization. # + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. @r4:DataTypeDefinition { - name: "PASClaimResponseItemAdjudication", + name: "PASClaimResponseAdjudication", baseType: (), elements: { "reason": { @@ -1378,7 +2134,7 @@ public type PASClaimResponseItemAdjudicationCategory record {| max: 1, isArray: false, description: "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", - path: "ClaimResponse.item.adjudication.reason" + path: "ClaimResponse.adjudication.reason" }, "amount": { name: "amount", @@ -1387,7 +2143,7 @@ public type PASClaimResponseItemAdjudicationCategory record {| max: 1, isArray: false, description: "Monetary amount associated with the category.", - path: "ClaimResponse.item.adjudication.amount" + path: "ClaimResponse.adjudication.amount" }, "extension": { name: "extension", @@ -1396,7 +2152,7 @@ public type PASClaimResponseItemAdjudicationCategory record {| max: int:MAX_VALUE, isArray: true, description: "An Extension", - path: "ClaimResponse.item.adjudication.extension" + path: "ClaimResponse.adjudication.extension" }, "modifierExtension": { name: "modifierExtension", @@ -1405,7 +2161,7 @@ public type PASClaimResponseItemAdjudicationCategory record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.item.adjudication.modifierExtension" + path: "ClaimResponse.adjudication.modifierExtension" }, "id": { name: "id", @@ -1414,25 +2170,16 @@ public type PASClaimResponseItemAdjudicationCategory record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.item.adjudication.id" + path: "ClaimResponse.adjudication.id" }, "category": { name: "category", - dataType: PASClaimResponseItemAdjudicationCategory, + dataType: PASClaimResponseAdjudicationCategory, min: 1, max: 1, isArray: false, description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", - path: "ClaimResponse.item.adjudication.category" - }, - "reviewAction": { - name: "reviewAction", - dataType: r4:Extension, - min: 0, - max: 1, - isArray: false, - description: "The details of the review action that is necessary for the authorization.", - path: "ClaimResponse.item.adjudication.extension" + path: "ClaimResponse.adjudication.category" }, "value": { name: "value", @@ -1441,7 +2188,7 @@ public type PASClaimResponseItemAdjudicationCategory record {| max: 1, isArray: false, description: "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", - path: "ClaimResponse.item.adjudication.value" + path: "ClaimResponse.adjudication.value" } }, serializers: { @@ -1449,7 +2196,8 @@ public type PASClaimResponseItemAdjudicationCategory record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseItemAdjudication record {| + +public type PASClaimResponseAdjudication record {| *r4:BackboneElement; r4:CodeableConcept reason?; @@ -1457,97 +2205,10 @@ public type PASClaimResponseItemAdjudication record {| r4:Extension[] extension?; r4:Extension[] modifierExtension?; string id?; - PASClaimResponseItemAdjudicationCategory category; - r4:Extension reviewAction?; + PASClaimResponseAdjudicationCategory category; decimal value?; |}; -# PASClaimResponseProcessNoteType enum -public enum PASClaimResponseProcessNoteType { - CODE_TYPE_PRINT = "print", - CODE_TYPE_DISPLAY = "display", - CODE_TYPE_PRINTOPER = "printoper" -} - -# PASClaimResponseOutcome enum -public enum PASClaimResponseOutcome { - CODE_OUTCOME_QUEUED = "queued", - CODE_OUTCOME_COMPLETE = "complete", - CODE_OUTCOME_ERROR = "error", - CODE_OUTCOME_PARTIAL = "partial" -} - -# FHIR PASClaimResponseTotal datatype record. -# -# + amount - Monetary total amount associated with the category. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + category - A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item. -@r4:DataTypeDefinition { - name: "PASClaimResponseTotal", - baseType: (), - elements: { - "amount": { - name: "amount", - dataType: r4:Money, - min: 1, - max: 1, - isArray: false, - description: "Monetary total amount associated with the category.", - path: "ClaimResponse.total.amount" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.total.extension" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.total.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.total.id" - }, - "category": { - name: "category", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", - path: "ClaimResponse.total.category" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimResponseTotal record {| - *r4:BackboneElement; - - r4:Money amount; - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; - string id?; - r4:CodeableConcept category; -|}; # FHIR PASClaimResponseItem datatype record. # @@ -1634,16 +2295,23 @@ public type PASClaimResponseTotal record {| public type PASClaimResponseItem record {| *r4:BackboneElement; - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; - r4:positiveInt[] noteNumber?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication constraint. This field must be an array containing at most one item." + } } PASClaimResponseItemAdjudication[] adjudication; r4:positiveInt itemSequence; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; PASClaimResponseItemDetail[] detail?; string id?; + r4:positiveInt [] noteNumber?; |}; # FHIR PASClaimResponseInsurance datatype record. @@ -1751,119 +2419,4 @@ public type PASClaimResponseInsurance record {| string id?; |}; -# FHIR PASClaimResponsePayment datatype record. -# -# + date - Estimated date the payment will be issued or the actual issue date of payment. -# + identifier - Issuer's unique identifier for the payment instrument. -# + adjustmentReason - Reason for the payment adjustment. -# + amount - Benefits payable less any payment adjustment. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + adjustment - Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - Whether this represents partial or complete payment of the benefits payable. -@r4:DataTypeDefinition { - name: "PASClaimResponsePayment", - baseType: (), - elements: { - "date": { - name: "date", - dataType: r4:date, - min: 0, - max: 1, - isArray: false, - description: "Estimated date the payment will be issued or the actual issue date of payment.", - path: "ClaimResponse.payment.date" - }, - "identifier": { - name: "identifier", - dataType: r4:Identifier, - min: 0, - max: 1, - isArray: false, - description: "Issuer's unique identifier for the payment instrument.", - path: "ClaimResponse.payment.identifier" - }, - "adjustmentReason": { - name: "adjustmentReason", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "Reason for the payment adjustment.", - path: "ClaimResponse.payment.adjustmentReason" - }, - "amount": { - name: "amount", - dataType: r4:Money, - min: 1, - max: 1, - isArray: false, - description: "Benefits payable less any payment adjustment.", - path: "ClaimResponse.payment.amount" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.payment.extension" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.payment.modifierExtension" - }, - "adjustment": { - name: "adjustment", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication.", - path: "ClaimResponse.payment.adjustment" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.payment.id" - }, - "type": { - name: "type", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "Whether this represents partial or complete payment of the benefits payable.", - path: "ClaimResponse.payment.type" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimResponsePayment record {| - *r4:BackboneElement; - - r4:date date?; - r4:Identifier identifier?; - r4:CodeableConcept adjustmentReason?; - r4:Money amount; - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; - r4:Money adjustment?; - string id?; - r4:CodeableConcept 'type; -|}; diff --git a/davincipas/resource_pasclaim_response_base.bal b/davincipas/resource_pasclaim_response_base.bal index 3cec181a..af880572 100644 --- a/davincipas/resource_pasclaim_response_base.bal +++ b/davincipas/resource_pasclaim_response_base.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,16 +13,19 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. import ballerina/constraint; import ballerinax/health.fhir.r4; +import ballerinax/health.fhir.r4.international401; public const string PROFILE_BASE_PASCLAIMRESPONSEBASE = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claimresponse-base"; public const RESOURCE_NAME_PASCLAIMRESPONSEBASE = "ClaimResponse"; +public type PASClaimResponseBaseExtensions (r4:Extension | ExtensionEpsdtIndicator | ExtensionNursingHomeLevelOfCare | ExtensionProductOrServiceCodeEnd | ExtensionRevenueUnitRateLimit ); + # FHIR PASClaimResponseBase resource record. # # + resourceType - The type of the resource describes @@ -37,6 +40,7 @@ public const RESOURCE_NAME_PASCLAIMRESPONSEBASE = "ClaimResponse"; # + 'error - Errors encountered during the processing of the adjudication. # + 'type - A finer grained suite of claim type codes which may convey additional information such as Inpatient vs Outpatient and/or a specialty service. # + processNote - A note that describes or explains adjudication results in a human readable form. +# + adjudication - The adjudication results which are presented at the header level rather than at the line-item or add-item levels. # + addItem - The first-tier service adjudications for payor added product or service lines. # + total - Categorized monetary totals for the adjudication. # + fundsReserve - A code, used only on a response to a preauthorization, to indicate whether the benefits payable have been reserved and for whom. @@ -76,7 +80,7 @@ public const RESOURCE_NAME_PASCLAIMRESPONSEBASE = "ClaimResponse"; "request" : { name: "request", dataType: r4:Reference, - min: 0, + min: 1, max: 1, isArray: false, path: "ClaimResponse.request" @@ -157,6 +161,16 @@ public const RESOURCE_NAME_PASCLAIMRESPONSEBASE = "ClaimResponse"; isArray: true, path: "ClaimResponse.processNote" }, + + "adjudication" : { + name: "adjudication", + dataType: PASClaimResponseBaseAdjudication, + min: 0, + max: int:MAX_VALUE, + isArray: true, + path: "ClaimResponse.adjudication" + }, + "addItem" : { name: "addItem", dataType: PASClaimResponseBaseAddItem, @@ -241,7 +255,7 @@ public const RESOURCE_NAME_PASCLAIMRESPONSEBASE = "ClaimResponse"; }, "identifier" : { name: "identifier", - dataType: r4:Identifier, + dataType: PASClaimResponseBaseIdentifier, min: 0, max: int:MAX_VALUE, isArray: true, @@ -358,7 +372,7 @@ public type PASClaimResponseBase record {| RESOURCE_NAME_PASCLAIMRESPONSEBASE resourceType = RESOURCE_NAME_PASCLAIMRESPONSEBASE; PASClaimResponseBaseInsurance[] insurance?; - r4:Reference request?; + r4:Reference request; r4:Extension[] extension?; PASClaimResponseBaseUse use; r4:Extension[] modifierExtension?; @@ -368,6 +382,7 @@ public type PASClaimResponseBase record {| PASClaimResponseBaseError[] 'error?; r4:CodeableConcept 'type; PASClaimResponseBaseProcessNote[] processNote?; + PASClaimResponseBaseAdjudication [] adjudication?; PASClaimResponseBaseAddItem[] addItem?; PASClaimResponseBaseTotal[] total?; r4:CodeableConcept fundsReserve?; @@ -394,58 +409,141 @@ public type PASClaimResponseBase record {| r4:Element ...; |}; -# FHIR PASClaimResponseBaseAddItemDetail datatype record. +# FHIR PASClaimResponseBaseAdjudicationCategory datatype record. # -# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + quantity - The number of repetitions of a service or product. -# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseAdjudicationCategory", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASClaimResponseBaseAdjudicationCategoryCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "ClaimResponse.adjudication.category.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseBaseAdjudicationCategory record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.adjudication.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.adjudication.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimResponseBaseAdjudicationCategoryCoding [] coding; +|}; + + +# PASClaimResponseBaseIdentifierUse enum +public enum PASClaimResponseBaseIdentifierUse { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + +# FHIR PASClaimResponseBaseAddItemAdjudicationCategoryCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseAddItemAdjudicationCategoryCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "ClaimResponse.addItem.adjudication.category.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "ClaimResponse.addItem.adjudication.category.coding.code" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseBaseAddItemAdjudicationCategoryCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; + r4:code code = "submitted"; +|}; + + +# FHIR PASClaimResponseBaseAddItemAdjudication datatype record. +# +# + reason - A code supporting the understanding of the adjudication result and explaining variance from expected amount. +# + amount - Monetary amount associated with the category. +# + extension - An Extension # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + subDetail - The third-tier service adjudications for payor added services. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. -# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. -# + net - The quantity times the unit price for an additional service or product or charge. -# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. +# + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. +# + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. @r4:DataTypeDefinition { - name: "PASClaimResponseBaseAddItemDetail", + name: "PASClaimResponseBaseAddItemAdjudication", baseType: (), elements: { - "unitPrice": { - name: "unitPrice", - dataType: r4:Money, + "reason": { + name: "reason", + dataType: r4:CodeableConcept, min: 0, max: 1, isArray: false, - description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", - path: "ClaimResponse.addItem.detail.unitPrice" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.addItem.detail.extension" + description: "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", + path: "ClaimResponse.addItem.adjudication.reason" }, - "quantity": { - name: "quantity", - dataType: r4:Quantity, + + "amount": { + name: "amount", + dataType: r4:Money, min: 0, max: 1, isArray: false, - description: "The number of repetitions of a service or product.", - path: "ClaimResponse.addItem.detail.quantity" + description: "Monetary amount associated with the category.", + path: "ClaimResponse.addItem.adjudication.amount" }, - "modifier": { - name: "modifier", - dataType: r4:CodeableConcept, + + "extension": { + name: "extension", + dataType: r4:Extension, min: 0, max: int:MAX_VALUE, isArray: true, - description: "Item typification or modifiers codes to convey additional context for the product or service.", - path: "ClaimResponse.addItem.detail.modifier" + description: "An Extension", + path: "ClaimResponse.addItem.adjudication.extension" }, "modifierExtension": { name: "modifierExtension", @@ -454,16 +552,7 @@ public type PASClaimResponseBase record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.addItem.detail.modifierExtension" - }, - "subDetail": { - name: "subDetail", - dataType: PASClaimResponseBaseAddItemDetailSubDetail, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The third-tier service adjudications for payor added services.", - path: "ClaimResponse.addItem.detail.subDetail" + path: "ClaimResponse.addItem.adjudication.modifierExtension" }, "id": { name: "id", @@ -472,43 +561,27 @@ public type PASClaimResponseBase record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.addItem.detail.id" + path: "ClaimResponse.addItem.adjudication.id" }, - "productOrService": { - name: "productOrService", - dataType: r4:CodeableConcept, + + "category": { + name: "category", + dataType: PASClaimResponseBaseAddItemAdjudicationCategory, min: 1, max: 1, isArray: false, - description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", - path: "ClaimResponse.addItem.detail.productOrService" + description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", + path: "ClaimResponse.addItem.adjudication.category" }, - "factor": { - name: "factor", + + "value": { + name: "value", dataType: decimal, min: 0, max: 1, isArray: false, - description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - path: "ClaimResponse.addItem.detail.factor" - }, - "net": { - name: "net", - dataType: r4:Money, - min: 0, - max: 1, - isArray: false, - description: "The quantity times the unit price for an additional service or product or charge.", - path: "ClaimResponse.addItem.detail.net" - }, - "noteNumber": { - name: "noteNumber", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The numbers associated with notes below which apply to the adjudication of this item.", - path: "ClaimResponse.addItem.detail.noteNumber" + description: "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", + path: "ClaimResponse.addItem.adjudication.value" } }, serializers: { @@ -516,43 +589,51 @@ public type PASClaimResponseBase record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseBaseAddItemDetail record {| + +public type PASClaimResponseBaseAddItemAdjudication record {| *r4:BackboneElement; - r4:Money unitPrice?; + r4:CodeableConcept reason?; + r4:Money amount?; r4:Extension[] extension?; - r4:Quantity quantity?; - r4:CodeableConcept[] modifier?; r4:Extension[] modifierExtension?; - PASClaimResponseBaseAddItemDetailSubDetail[] subDetail?; string id?; - r4:CodeableConcept productOrService; - decimal factor?; - r4:Money net?; - r4:positiveInt[] noteNumber?; + PASClaimResponseBaseAddItemAdjudicationCategory category; + decimal value?; |}; -# FHIR PASClaimResponseBaseProcessNote datatype record. + +# FHIR PASClaimResponseBaseAddItemProvider datatype record. # -# + number - A number to uniquely identify a note entry. +# + reference - A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources. +# + identifier - An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + language - A code to define the language used in the text of the note. +# + display - Plain text narrative that identifies the resource in addition to the resource reference. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + text - The explanation or description associated with the processing. -# + 'type - The business purpose of the note text. +# + 'type - The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. 'Patient' is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources). + @r4:DataTypeDefinition { - name: "PASClaimResponseBaseProcessNote", + name: "PASClaimResponseBaseAddItemProvider", baseType: (), elements: { - "number": { - name: "number", - dataType: r4:positiveInt, + "reference": { + name: "reference", + dataType: string, min: 0, max: 1, isArray: false, - description: "A number to uniquely identify a note entry.", - path: "ClaimResponse.processNote.number" + description: "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.", + path: "ClaimResponse.addItem.provider.reference" + }, + + "identifier": { + name: "identifier", + dataType: r4:Identifier, + min: 0, + max: 1, + isArray: false, + description: "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.", + path: "ClaimResponse.addItem.provider.identifier" }, "extension": { name: "extension", @@ -561,25 +642,17 @@ public type PASClaimResponseBaseAddItemDetail record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.processNote.extension" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.processNote.modifierExtension" + path: "ClaimResponse.addItem.provider.extension" }, - "language": { - name: "language", - dataType: r4:CodeableConcept, + + "display": { + name: "display", + dataType: string, min: 0, max: 1, isArray: false, - description: "A code to define the language used in the text of the note.", - path: "ClaimResponse.processNote.language" + description: "Plain text narrative that identifies the resource in addition to the resource reference.", + path: "ClaimResponse.addItem.provider.display" }, "id": { name: "id", @@ -588,25 +661,17 @@ public type PASClaimResponseBaseAddItemDetail record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.processNote.id" - }, - "text": { - name: "text", - dataType: string, - min: 1, - max: 1, - isArray: false, - description: "The explanation or description associated with the processing.", - path: "ClaimResponse.processNote.text" - }, + path: "ClaimResponse.addItem.provider.id" + }, + "type": { name: "type", - dataType: PASClaimResponseBaseProcessNoteType, + dataType: r4:uri, min: 0, max: 1, isArray: false, - description: "The business purpose of the note text.", - path: "ClaimResponse.processNote.type" + description: "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent. The type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. 'Patient' is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).", + path: "ClaimResponse.addItem.provider.type" } }, serializers: { @@ -614,50 +679,34 @@ public type PASClaimResponseBaseAddItemDetail record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseBaseProcessNote record {| - *r4:BackboneElement; - r4:positiveInt number?; +public type PASClaimResponseBaseAddItemProvider record {| + *r4:Reference; + + string reference?; + r4:Identifier identifier?; r4:Extension[] extension?; - r4:Extension[] modifierExtension?; - r4:CodeableConcept language?; + string display?; string id?; - string text; - PASClaimResponseBaseProcessNoteType 'type?; + r4:uri 'type?; |}; -# FHIR PASClaimResponseBaseInsurance datatype record. + +# FHIR PASClaimResponseBaseIdentifier datatype record. # -# + coverage - Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system. -# + sequence - A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + businessArrangement - A business agreement number established between the provider and the insurer for special business processing purposes. -# + claimResponse - The result of the adjudication of the line items for the Coverage specified in this insurance. -# + focal - A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + period - Time period during which identifier is/was valid for use. +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. +# + use - The purpose of this identifier. +# + assigner - Organization that issued/manages the identifier. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. +# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. + @r4:DataTypeDefinition { - name: "PASClaimResponseBaseInsurance", + name: "PASClaimResponseBaseIdentifier", baseType: (), elements: { - "coverage": { - name: "coverage", - dataType: r4:Reference, - min: 1, - max: 1, - isArray: false, - description: "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", - path: "ClaimResponse.insurance.coverage" - }, - "sequence": { - name: "sequence", - dataType: r4:positiveInt, - min: 1, - max: 1, - isArray: false, - description: "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", - path: "ClaimResponse.insurance.sequence" - }, "extension": { name: "extension", dataType: r4:Extension, @@ -665,43 +714,47 @@ public type PASClaimResponseBaseProcessNote record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.insurance.extension" + path: "ClaimResponse.identifier.extension" }, - "businessArrangement": { - name: "businessArrangement", - dataType: string, + + "period": { + name: "period", + dataType: r4:Period, min: 0, max: 1, isArray: false, - description: "A business agreement number established between the provider and the insurer for special business processing purposes.", - path: "ClaimResponse.insurance.businessArrangement" + description: "Time period during which identifier is/was valid for use.", + path: "ClaimResponse.identifier.period" }, - "claimResponse": { - name: "claimResponse", - dataType: r4:Reference, - min: 0, + + "system": { + name: "system", + dataType: r4:uri, + min: 1, max: 1, isArray: false, - description: "The result of the adjudication of the line items for the Coverage specified in this insurance.", - path: "ClaimResponse.insurance.claimResponse" + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "ClaimResponse.identifier.system" }, - "focal": { - name: "focal", - dataType: boolean, - min: 1, + + "use": { + name: "use", + dataType: PASClaimResponseBaseIdentifierUse, + min: 0, max: 1, isArray: false, - description: "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", - path: "ClaimResponse.insurance.focal" + description: "The purpose of this identifier.", + path: "ClaimResponse.identifier.use" }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, + + "assigner": { + name: "assigner", + dataType: r4:Reference, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.insurance.modifierExtension" + max: 1, + isArray: false, + description: "Organization that issued/manages the identifier.", + path: "ClaimResponse.identifier.assigner" }, "id": { name: "id", @@ -710,7 +763,27 @@ public type PASClaimResponseBaseProcessNote record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.insurance.id" + path: "ClaimResponse.identifier.id" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "ClaimResponse.identifier.type" + }, + + "value": { + name: "value", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", + path: "ClaimResponse.identifier.value" } }, serializers: { @@ -718,49 +791,94 @@ public type PASClaimResponseBaseProcessNote record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseBaseInsurance record {| - *r4:BackboneElement; - r4:Reference coverage; - r4:positiveInt sequence; +public type PASClaimResponseBaseIdentifier record {| + *r4:Identifier; + r4:Extension[] extension?; - string businessArrangement?; - r4:Reference claimResponse?; - boolean focal; - r4:Extension[] modifierExtension?; + r4:Period period?; + r4:uri system; + PASClaimResponseBaseIdentifierUse use?; + r4:Reference assigner?; string id?; + r4:CodeableConcept 'type?; + string value; |}; -# FHIR PASClaimResponseBaseItem datatype record. + +# FHIR PASClaimResponseBaseAddItemAdjudicationCategory datatype record. # -# + adjudication - If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item. -# + itemSequence - A number to uniquely reference the claim item entries. -# + extension - An Extension -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + detail - A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. +# + coding - A reference to a code defined by a terminology system. + @r4:DataTypeDefinition { - name: "PASClaimResponseBaseItem", + name: "PASClaimResponseBaseAddItemAdjudicationCategory", baseType: (), elements: { - "adjudication": { - name: "adjudication", - dataType: PASClaimResponseBaseItemAdjudication, + "coding": { + name: "coding", + dataType: PASClaimResponseBaseAddItemAdjudicationCategoryCoding, min: 1, max: int:MAX_VALUE, isArray: true, - description: "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.", - path: "ClaimResponse.item.adjudication" + description: "A reference to a code defined by a terminology system.", + path: "ClaimResponse.addItem.adjudication.category.coding" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseBaseAddItemAdjudicationCategory record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication.category.coding constraint. This field must be an array containing at least one item." }, - "itemSequence": { - name: "itemSequence", - dataType: r4:positiveInt, - min: 1, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimResponseBaseAddItemAdjudicationCategoryCoding [] coding; +|}; + + +# FHIR PASClaimResponseBaseAdjudication datatype record. +# +# + reason - A code supporting the understanding of the adjudication result and explaining variance from expected amount. +# + amount - Monetary amount associated with the category. +# + extension - An Extension +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. +# + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. + +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseAdjudication", + baseType: (), + elements: { + "reason": { + name: "reason", + dataType: r4:CodeableConcept, + min: 0, max: 1, isArray: false, - description: "A number to uniquely reference the claim item entries.", - path: "ClaimResponse.item.itemSequence" + description: "A code supporting the understanding of the adjudication result and explaining variance from expected amount.", + path: "ClaimResponse.adjudication.reason" + }, + + "amount": { + name: "amount", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "Monetary amount associated with the category.", + path: "ClaimResponse.adjudication.amount" }, "extension": { name: "extension", @@ -769,7 +887,7 @@ public type PASClaimResponseBaseInsurance record {| max: int:MAX_VALUE, isArray: true, description: "An Extension", - path: "ClaimResponse.item.extension" + path: "ClaimResponse.adjudication.extension" }, "modifierExtension": { name: "modifierExtension", @@ -778,16 +896,7 @@ public type PASClaimResponseBaseInsurance record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.item.modifierExtension" - }, - "detail": { - name: "detail", - dataType: PASClaimResponseBaseItemDetail, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", - path: "ClaimResponse.item.detail" + path: "ClaimResponse.adjudication.modifierExtension" }, "id": { name: "id", @@ -796,16 +905,27 @@ public type PASClaimResponseBaseInsurance record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.item.id" + path: "ClaimResponse.adjudication.id" }, - "noteNumber": { - name: "noteNumber", - dataType: r4:positiveInt, + + "category": { + name: "category", + dataType: PASClaimResponseBaseAdjudicationCategory, + min: 1, + max: 1, + isArray: false, + description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", + path: "ClaimResponse.adjudication.category" + }, + + "value": { + name: "value", + dataType: decimal, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The numbers associated with notes below which apply to the adjudication of this item.", - path: "ClaimResponse.item.noteNumber" + max: 1, + isArray: false, + description: "A non-monetary value associated with the category. Mutually exclusive to the amount element above.", + path: "ClaimResponse.adjudication.value" } }, serializers: { @@ -813,269 +933,51 @@ public type PASClaimResponseBaseInsurance record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseBaseItem record {| + +public type PASClaimResponseBaseAdjudication record {| *r4:BackboneElement; + r4:CodeableConcept reason?; + r4:Money amount?; r4:Extension[] extension?; r4:Extension[] modifierExtension?; - r4:positiveInt[] noteNumber?; - @constraint:Array { - minLength: 1 - } - PASClaimResponseBaseItemAdjudication[] adjudication; - r4:positiveInt itemSequence; - PASClaimResponseBaseItemDetail[] detail?; string id?; + PASClaimResponseBaseAdjudicationCategory category; + decimal value?; |}; -# FHIR PASClaimResponseBaseItemDetail datatype record. +# FHIR PASClaimResponseBasePayment datatype record. # +# + date - Estimated date the payment will be issued or the actual issue date of payment. +# + identifier - Issuer's unique identifier for the payment instrument. +# + adjustmentReason - Reason for the payment adjustment. +# + amount - Benefits payable less any payment adjustment. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + detailSequence - A number to uniquely reference the claim detail entry. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + subDetail - A sub-detail adjudication of a simple product or service. +# + adjustment - Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. +# + 'type - Whether this represents partial or complete payment of the benefits payable. @r4:DataTypeDefinition { - name: "PASClaimResponseBaseItemDetail", + name: "PASClaimResponseBasePayment", baseType: (), elements: { - "extension": { - name: "extension", - dataType: r4:Extension, + "date": { + name: "date", + dataType: r4:date, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.item.detail.extension" - }, - "detailSequence": { - name: "detailSequence", - dataType: r4:positiveInt, - min: 1, max: 1, isArray: false, - description: "A number to uniquely reference the claim detail entry.", - path: "ClaimResponse.item.detail.detailSequence" + description: "Estimated date the payment will be issued or the actual issue date of payment.", + path: "ClaimResponse.payment.date" }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, + "identifier": { + name: "identifier", + dataType: r4:Identifier, min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.item.detail.modifierExtension" - }, - "subDetail": { - name: "subDetail", - dataType: PASClaimResponseBaseItemDetailSubDetail, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A sub-detail adjudication of a simple product or service.", - path: "ClaimResponse.item.detail.subDetail" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.item.detail.id" - }, - "noteNumber": { - name: "noteNumber", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The numbers associated with notes below which apply to the adjudication of this item.", - path: "ClaimResponse.item.detail.noteNumber" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimResponseBaseItemDetail record {| - *r4:BackboneElement; - - r4:Extension[] extension?; - r4:positiveInt detailSequence; - r4:Extension[] modifierExtension?; - PASClaimResponseBaseItemDetailSubDetail[] subDetail?; - string id?; - r4:positiveInt[] noteNumber?; -|}; - -# FHIR PASClaimResponseBaseItemAdjudicationCategoryCoding datatype record. -# -# + system - The identification of the code system that defines the meaning of the symbol in the code. -# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). -@r4:DataTypeDefinition { - name: "PASClaimResponseBaseItemAdjudicationCategoryCoding", - baseType: (), - elements: { - "system": { - name: "system", - dataType: r4:uri, - min: 1, - max: 1, - isArray: false, - description: "The identification of the code system that defines the meaning of the symbol in the code.", - path: "ClaimResponse.item.adjudication.category.coding.system" - }, - "code": { - name: "code", - dataType: r4:code, - min: 1, - max: 1, - isArray: false, - description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", - path: "ClaimResponse.item.adjudication.category.coding.code" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimResponseBaseItemAdjudicationCategoryCoding record {| - *r4:Coding; - - r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; - r4:code code = "submitted"; -|}; - -# FHIR PASClaimResponseBaseError datatype record. -# -# + subDetailSequence - The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. -# + itemSequence - The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. -# + extension - An Extension -# + code - An error code, from a specified code system, which details why the claim could not be adjudicated. -# + detailSequence - The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -@r4:DataTypeDefinition { - name: "PASClaimResponseBaseError", - baseType: (), - elements: { - "subDetailSequence": { - name: "subDetailSequence", - dataType: r4:positiveInt, - min: 0, - max: 1, - isArray: false, - description: "The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", - path: "ClaimResponse.error.subDetailSequence" - }, - "itemSequence": { - name: "itemSequence", - dataType: r4:positiveInt, - min: 0, - max: 1, - isArray: false, - description: "The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", - path: "ClaimResponse.error.itemSequence" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "An Extension", - path: "ClaimResponse.error.extension" - }, - "code": { - name: "code", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "An error code, from a specified code system, which details why the claim could not be adjudicated.", - path: "ClaimResponse.error.code" - }, - "detailSequence": { - name: "detailSequence", - dataType: r4:positiveInt, - min: 0, - max: 1, - isArray: false, - description: "The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", - path: "ClaimResponse.error.detailSequence" - }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.error.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.error.id" - } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASClaimResponseBaseError record {| - *r4:BackboneElement; - - r4:positiveInt subDetailSequence?; - r4:positiveInt itemSequence?; - r4:Extension[] extension?; - r4:CodeableConcept code; - r4:positiveInt detailSequence?; - r4:Extension[] modifierExtension?; - string id?; -|}; - -# FHIR PASClaimResponseBasePayment datatype record. -# -# + date - Estimated date the payment will be issued or the actual issue date of payment. -# + identifier - Issuer's unique identifier for the payment instrument. -# + adjustmentReason - Reason for the payment adjustment. -# + amount - Benefits payable less any payment adjustment. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + adjustment - Total amount of all adjustments to this payment included in this transaction which are not related to this claim's adjudication. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - Whether this represents partial or complete payment of the benefits payable. -@r4:DataTypeDefinition { - name: "PASClaimResponseBasePayment", - baseType: (), - elements: { - "date": { - name: "date", - dataType: r4:date, - min: 0, - max: 1, - isArray: false, - description: "Estimated date the payment will be issued or the actual issue date of payment.", - path: "ClaimResponse.payment.date" - }, - "identifier": { - name: "identifier", - dataType: r4:Identifier, - min: 0, - max: 1, - isArray: false, - description: "Issuer's unique identifier for the payment instrument.", - path: "ClaimResponse.payment.identifier" + max: 1, + isArray: false, + description: "Issuer's unique identifier for the payment instrument.", + path: "ClaimResponse.payment.identifier" }, "adjustmentReason": { name: "adjustmentReason", @@ -1169,6 +1071,7 @@ public enum PASClaimResponseBaseProcessNoteType { # FHIR PASClaimResponseBaseAddItemDetailSubDetail datatype record. # +# + adjudication - The adjudication results. # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + quantity - The number of repetitions of a service or product. @@ -1183,6 +1086,16 @@ public enum PASClaimResponseBaseProcessNoteType { name: "PASClaimResponseBaseAddItemDetailSubDetail", baseType: (), elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.addItem.detail.subDetail.adjudication" + }, + "unitPrice": { name: "unitPrice", dataType: r4:Money, @@ -1282,6 +1195,17 @@ public enum PASClaimResponseBaseProcessNoteType { public type PASClaimResponseBaseAddItemDetailSubDetail record {| *r4:BackboneElement; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.subDetail.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.subDetail.adjudication constraint. This field must be an array containing at most one item." + } + } + international401:ClaimResponseItemAdjudication [] adjudication; r4:Money unitPrice?; r4:Extension[] extension?; r4:Quantity quantity?; @@ -1302,7 +1226,6 @@ public type PASClaimResponseBaseAddItemDetailSubDetail record {| # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. # + category - A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item. -# + reviewAction - The details of the review action that is necessary for the authorization. # + value - A non-monetary value associated with the category. Mutually exclusive to the amount element above. @r4:DataTypeDefinition { name: "PASClaimResponseBaseItemAdjudication", @@ -1362,15 +1285,7 @@ public type PASClaimResponseBaseAddItemDetailSubDetail record {| description: "A code to indicate the information type of this adjudication record. Information types may include the value submitted, maximum values or percentages allowed or payable under the plan, amounts that: the patient is responsible for in aggregate or pertaining to this item; amounts paid by other coverages; and, the benefit payable for this item.", path: "ClaimResponse.item.adjudication.category" }, - "reviewAction": { - name: "reviewAction", - dataType: r4:Extension, - min: 0, - max: 1, - isArray: false, - description: "The details of the review action that is necessary for the authorization.", - path: "ClaimResponse.item.adjudication.extension" - }, + "value": { name: "value", dataType: decimal, @@ -1395,15 +1310,14 @@ public type PASClaimResponseBaseItemAdjudication record {| r4:Extension[] modifierExtension?; string id?; PASClaimResponseBaseItemAdjudicationCategory category; - r4:Extension reviewAction?; decimal value?; |}; # FHIR PASClaimResponseBaseAddItem datatype record. # # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + quantity - The number of repetitions of a service or product. +# + extension - An Extension +# + quantity - The comparator is not used on a SimpleQuantity # + programCode - Identifies the program under which this may be recovered. # + modifier - Item typification or modifiers codes to convey additional context for the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). @@ -1412,6 +1326,7 @@ public type PASClaimResponseBaseItemAdjudication record {| # + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. # + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. # + servicedPeriod - The date or dates when the service or product was supplied, performed or completed. +# + adjudication - The adjudication results. # + itemSequence - Claim items which this service line is intended to replace. # + bodySite - Physical service site on the patient (limb, tooth, etc.). # + locationCodeableConcept - Where the product or service was provided. @@ -1443,7 +1358,7 @@ public type PASClaimResponseBaseItemAdjudication record {| min: 0, max: int:MAX_VALUE, isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + description: "An Extension", path: "ClaimResponse.addItem.extension" }, "quantity": { @@ -1452,7 +1367,7 @@ public type PASClaimResponseBaseItemAdjudication record {| min: 0, max: 1, isArray: false, - description: "The number of repetitions of a service or product.", + description: "The comparator is not used on a SimpleQuantity", path: "ClaimResponse.addItem.quantity" }, "programCode": { @@ -1527,11 +1442,22 @@ public type PASClaimResponseBaseItemAdjudication record {| description: "The date or dates when the service or product was supplied, performed or completed.", path: "ClaimResponse.addItem.serviced[x]" }, + + "adjudication": { + name: "adjudication", + dataType: PASClaimResponseBaseAddItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.addItem.adjudication" + }, + "itemSequence": { name: "itemSequence", dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, + min: 1, + max: 1, isArray: true, description: "Claim items which this service line is intended to replace.", path: "ClaimResponse.addItem.itemSequence" @@ -1556,7 +1482,7 @@ public type PASClaimResponseBaseItemAdjudication record {| }, "provider": { name: "provider", - dataType: r4:Reference, + dataType: PASClaimResponseBaseAddItemProvider, min: 0, max: int:MAX_VALUE, isArray: true, @@ -1617,126 +1543,981 @@ public type PASClaimResponseBaseItemAdjudication record {| description: "The date or dates when the service or product was supplied, performed or completed.", path: "ClaimResponse.addItem.serviced[x]" }, - "factor": { - name: "factor", - dataType: decimal, + "factor": { + name: "factor", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", + path: "ClaimResponse.addItem.factor" + }, + "net": { + name: "net", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "The quantity times the unit price for an additional service or product or charge.", + path: "ClaimResponse.addItem.net" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimResponseBaseAddItem record {| + *r4:BackboneElement; + + r4:Money unitPrice?; + r4:Extension[] extension?; + r4:Quantity quantity?; + r4:CodeableConcept[] programCode?; + r4:CodeableConcept[] modifier?; + r4:Extension[] modifierExtension?; + r4:positiveInt[] subdetailSequence?; + r4:Address locationAddress?; + r4:CodeableConcept productOrService; + r4:positiveInt[] noteNumber?; + r4:Period servicedPeriod?; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.adjudication constraint. This field must be an array containing at most one item." + } + } + PASClaimResponseBaseAddItemAdjudication [] adjudication; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.itemSequence constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.itemSequence constraint. This field must be an array containing at most one item." + } + } + r4:positiveInt [] itemSequence; + r4:CodeableConcept bodySite?; + r4:CodeableConcept locationCodeableConcept?; + PASClaimResponseBaseAddItemProvider [] provider?; + r4:positiveInt[] detailSequence?; + r4:CodeableConcept[] subSite?; + PASClaimResponseBaseAddItemDetail[] detail?; + string id?; + r4:Reference locationReference?; + r4:date servicedDate?; + decimal factor?; + r4:Money net?; +|}; + +# FHIR PASClaimResponseBaseItemAdjudicationCategory datatype record. +# +# + coding - A reference to a code defined by a terminology system. +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseItemAdjudicationCategory", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASClaimResponseBaseItemAdjudicationCategoryCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "ClaimResponse.item.adjudication.category.coding" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} +public type PASClaimResponseBaseItemAdjudicationCategory record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication.category.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimResponseBaseItemAdjudicationCategoryCoding[] coding; +|}; + + +# FHIR PASClaimResponseBaseTotal datatype record. +# +# + amount - Monetary total amount associated with the category. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + category - A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item. + +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseTotal", + baseType: (), + elements: { + "amount": { + name: "amount", + dataType: r4:Money, + min: 1, + max: 1, + isArray: false, + description: "Monetary total amount associated with the category.", + path: "ClaimResponse.total.amount" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.total.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.total.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.total.id" + }, + + "category": { + name: "category", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", + path: "ClaimResponse.total.category" +} + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseBaseTotal record {| + *r4:BackboneElement; + + r4:Money amount; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string id?; + r4:CodeableConcept category; +|}; + + +# PASClaimResponseBaseUse enum +public enum PASClaimResponseBaseUse { + CODE_USE_PREDETERMINATION = "predetermination", + CODE_USE_PREAUTHORIZATION = "preauthorization", + CODE_USE_CLAIM = "claim" +} + +# PASClaimResponseBaseOutcome enum +public enum PASClaimResponseBaseOutcome { + CODE_OUTCOME_QUEUED = "queued", + CODE_OUTCOME_COMPLETE = "complete", + CODE_OUTCOME_ERROR = "error", + CODE_OUTCOME_PARTIAL = "partial" +} + +# FHIR PASClaimResponseBaseAdjudicationCategoryCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseAdjudicationCategoryCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "ClaimResponse.adjudication.category.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "ClaimResponse.adjudication.category.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseBaseAdjudicationCategoryCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; + r4:code code = "submitted"; +|}; + + +# FHIR PASClaimResponseBaseAddItemDetail datatype record. +# +# + adjudication - The adjudication results. +# + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + quantity - The number of repetitions of a service or product. +# + modifier - Item typification or modifiers codes to convey additional context for the product or service. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + subDetail - The third-tier service adjudications for payor added services. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + productOrService - When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item. +# + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. +# + net - The quantity times the unit price for an additional service or product or charge. +# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseAddItemDetail", + baseType: (), + elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.addItem.detail.adjudication" + }, + + "unitPrice": { + name: "unitPrice", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group.", + path: "ClaimResponse.addItem.detail.unitPrice" + }, + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.addItem.detail.extension" + }, + + "quantity": { + name: "quantity", + dataType: r4:Quantity, + min: 0, + max: 1, + isArray: false, + description: "The number of repetitions of a service or product.", + path: "ClaimResponse.addItem.detail.quantity" + }, + + "modifier": { + name: "modifier", + dataType: r4:CodeableConcept, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Item typification or modifiers codes to convey additional context for the product or service.", + path: "ClaimResponse.addItem.detail.modifier" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.addItem.detail.modifierExtension" + }, + + "subDetail": { + name: "subDetail", + dataType: PASClaimResponseBaseAddItemDetailSubDetail, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The third-tier service adjudications for payor added services.", + path: "ClaimResponse.addItem.detail.subDetail" + }, + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.addItem.detail.id" + }, + + "productOrService": { + name: "productOrService", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "When the value is a group code then this item collects a set of related claim details, otherwise this contains the product, service, drug or other billing code for the item.", + path: "ClaimResponse.addItem.detail.productOrService" + }, + + "factor": { + name: "factor", + dataType: decimal, + min: 0, + max: 1, + isArray: false, + description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", + path: "ClaimResponse.addItem.detail.factor" + }, + + "net": { + name: "net", + dataType: r4:Money, + min: 0, + max: 1, + isArray: false, + description: "The quantity times the unit price for an additional service or product or charge.", + path: "ClaimResponse.addItem.detail.net" + }, + + "noteNumber": { + name: "noteNumber", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The numbers associated with notes below which apply to the adjudication of this item.", + path: "ClaimResponse.addItem.detail.noteNumber" + } + }, + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseBaseAddItemDetail record {| + *r4:BackboneElement; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.addItem.detail.adjudication constraint. This field must be an array containing at most one item." + } + } + international401:ClaimResponseItemAdjudication [] adjudication; + r4:Money unitPrice?; + r4:Extension[] extension?; + r4:Quantity quantity?; + r4:CodeableConcept [] modifier?; + r4:Extension[] modifierExtension?; + PASClaimResponseBaseAddItemDetailSubDetail [] subDetail?; + string id?; + r4:CodeableConcept productOrService; + decimal factor?; + r4:Money net?; + r4:positiveInt[] noteNumber?; +|}; + + +# FHIR PASClaimResponseBaseProcessNote datatype record. +# +# + number - A number to uniquely identify a note entry. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + language - A code to define the language used in the text of the note. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + text - The explanation or description associated with the processing. +# + 'type - The business purpose of the note text. + +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseProcessNote", + baseType: (), + elements: { + "number": { + name: "number", + dataType: r4:positiveInt, + min: 0, + max: 1, + isArray: false, + description: "A number to uniquely identify a note entry.", + path: "ClaimResponse.processNote.number" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.processNote.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.processNote.modifierExtension" + }, + + "language": { + name: "language", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "A code to define the language used in the text of the note.", + path: "ClaimResponse.processNote.language" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.processNote.id" + }, + + "text": { + name: "text", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "The explanation or description associated with the processing.", + path: "ClaimResponse.processNote.text" + }, + + "type": { + name: "type", + dataType: PASClaimResponseBaseProcessNoteType, + min: 0, + max: 1, + isArray: false, + description: "The business purpose of the note text.", + path: "ClaimResponse.processNote.type" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseBaseProcessNote record {| + *r4:BackboneElement; + + r4:positiveInt number?; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + r4:CodeableConcept language?; + string id?; + string text; + PASClaimResponseBaseProcessNoteType 'type?; +|}; + + +# FHIR PASClaimResponseBaseInsurance datatype record. +# +# + coverage - Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system. +# + sequence - A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + businessArrangement - A business agreement number established between the provider and the insurer for special business processing purposes. +# + claimResponse - The result of the adjudication of the line items for the Coverage specified in this insurance. +# + focal - A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. + +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseInsurance", + baseType: (), + elements: { + "coverage": { + name: "coverage", + dataType: r4:Reference, + min: 1, + max: 1, + isArray: false, + description: "Reference to the insurance card level information contained in the Coverage resource. The coverage issuing insurer will use these details to locate the patient's actual coverage within the insurer's information system.", + path: "ClaimResponse.insurance.coverage" + }, + + "sequence": { + name: "sequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely identify insurance entries and provide a sequence of coverages to convey coordination of benefit order.", + path: "ClaimResponse.insurance.sequence" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.insurance.extension" + }, + + "businessArrangement": { + name: "businessArrangement", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "A business agreement number established between the provider and the insurer for special business processing purposes.", + path: "ClaimResponse.insurance.businessArrangement" + }, + + "claimResponse": { + name: "claimResponse", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "The result of the adjudication of the line items for the Coverage specified in this insurance.", + path: "ClaimResponse.insurance.claimResponse" + }, + + "focal": { + name: "focal", + dataType: boolean, + min: 1, + max: 1, + isArray: false, + description: "A flag to indicate that this Coverage is to be used for adjudication of this claim when set to true.", + path: "ClaimResponse.insurance.focal" + }, + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.insurance.modifierExtension" + }, + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.insurance.id" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseBaseInsurance record {| + *r4:BackboneElement; + + r4:Reference coverage; + r4:positiveInt sequence; + r4:Extension [] extension?; + string businessArrangement?; + r4:Reference claimResponse?; + boolean focal; + r4:Extension [] modifierExtension?; + string id?; +|}; + + +# FHIR PASClaimResponseBaseItem datatype record. +# +# + adjudication - If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item. +# + itemSequence - A number to uniquely reference the claim item entries. +# + extension - An Extension +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + detail - A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. + +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseItem", + baseType: (), + elements: { + "adjudication": { + name: "adjudication", + dataType: PASClaimResponseBaseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "If this item is a group then the values here are a summary of the adjudication of the detail items. If this item is a simple product or service then this is the result of the adjudication of this item.", + path: "ClaimResponse.item.adjudication" + }, + + "itemSequence": { + name: "itemSequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely reference the claim item entries.", + path: "ClaimResponse.item.itemSequence" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "ClaimResponse.item.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.item.modifierExtension" + }, + + "detail": { + name: "detail", + dataType: PASClaimResponseBaseItemDetail, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A claim detail. Either a simple (a product or service) or a 'group' of sub-details which are simple items.", + path: "ClaimResponse.item.detail" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.item.id" + }, + + "noteNumber": { + name: "noteNumber", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The numbers associated with notes below which apply to the adjudication of this item.", + path: "ClaimResponse.item.noteNumber" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimResponseBaseItem record {| + *r4:BackboneElement; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.adjudication constraint. This field must be an array containing at most one item." + } + } + PASClaimResponseBaseItemAdjudication [] adjudication; + r4:positiveInt itemSequence; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + PASClaimResponseBaseItemDetail [] detail?; + string id?; + r4:positiveInt [] noteNumber?; +|}; + + +# FHIR PASClaimResponseBaseItemDetail datatype record. +# +# + adjudication - The adjudication results. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + detailSequence - A number to uniquely reference the claim detail entry. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + subDetail - A sub-detail adjudication of a simple product or service. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. + +@r4:DataTypeDefinition { + name: "PASClaimResponseBaseItemDetail", + baseType: (), + elements: { + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.item.detail.adjudication" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "ClaimResponse.item.detail.extension" + }, + + "detailSequence": { + name: "detailSequence", + dataType: r4:positiveInt, + min: 1, + max: 1, + isArray: false, + description: "A number to uniquely reference the claim detail entry.", + path: "ClaimResponse.item.detail.detailSequence" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "ClaimResponse.item.detail.modifierExtension" + }, + + "subDetail": { + name: "subDetail", + dataType: PASClaimResponseBaseItemDetailSubDetail, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A sub-detail adjudication of a simple product or service.", + path: "ClaimResponse.item.detail.subDetail" + }, + + "id": { + name: "id", + dataType: string, min: 0, max: 1, isArray: false, - description: "A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.", - path: "ClaimResponse.addItem.factor" + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "ClaimResponse.item.detail.id" }, - "net": { - name: "net", - dataType: r4:Money, + + "noteNumber": { + name: "noteNumber", + dataType: r4:positiveInt, min: 0, - max: 1, - isArray: false, - description: "The quantity times the unit price for an additional service or product or charge.", - path: "ClaimResponse.addItem.net" + max: int:MAX_VALUE, + isArray: true, + description: "The numbers associated with notes below which apply to the adjudication of this item.", + path: "ClaimResponse.item.detail.noteNumber" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseBaseAddItem record {| + +public type PASClaimResponseBaseItemDetail record {| *r4:BackboneElement; - r4:Money unitPrice?; - r4:Extension[] extension?; - r4:Quantity quantity?; - r4:CodeableConcept[] programCode?; - r4:CodeableConcept[] modifier?; - r4:Extension[] modifierExtension?; - r4:positiveInt[] subdetailSequence?; - r4:Address locationAddress?; - r4:CodeableConcept productOrService; - r4:positiveInt[] noteNumber?; - r4:Period servicedPeriod?; - r4:positiveInt[] itemSequence?; - r4:CodeableConcept bodySite?; - r4:CodeableConcept locationCodeableConcept?; - r4:Reference[] provider?; - r4:positiveInt[] detailSequence?; - r4:CodeableConcept[] subSite?; - PASClaimResponseBaseAddItemDetail[] detail?; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.detail.adjudication constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.ClaimResponse.item.detail.adjudication constraint. This field must be an array containing at most one item." + } + } + international401:ClaimResponseItemAdjudication [] adjudication; + r4:Extension [] extension?; + r4:positiveInt detailSequence; + r4:Extension [] modifierExtension?; + PASClaimResponseBaseItemDetailSubDetail [] subDetail?; string id?; - r4:Reference locationReference?; - r4:date servicedDate?; - decimal factor?; - r4:Money net?; + r4:positiveInt [] noteNumber?; |}; -# FHIR PASClaimResponseBaseItemAdjudicationCategory datatype record. + +# FHIR PASClaimResponseBaseItemAdjudicationCategoryCoding datatype record. # -# + coding - A reference to a code defined by a terminology system. +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + @r4:DataTypeDefinition { - name: "PASClaimResponseBaseItemAdjudicationCategory", + name: "PASClaimResponseBaseItemAdjudicationCategoryCoding", baseType: (), elements: { - "coding": { - name: "coding", - dataType: PASClaimResponseBaseItemAdjudicationCategoryCoding, + "system": { + name: "system", + dataType: r4:uri, min: 1, - max: int:MAX_VALUE, - isArray: true, - description: "A reference to a code defined by a terminology system.", - path: "ClaimResponse.item.adjudication.category.coding" + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "ClaimResponse.item.adjudication.category.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "ClaimResponse.item.adjudication.category.coding.code" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseBaseItemAdjudicationCategory record {| - *r4:CodeableConcept; - @constraint:Array { - minLength: 1 - } - PASClaimResponseBaseItemAdjudicationCategoryCoding[] coding; +public type PASClaimResponseBaseItemAdjudicationCategoryCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/adjudication"; + r4:code code = "submitted"; |}; -# PASClaimResponseBaseStatus enum -public enum PASClaimResponseBaseStatus { - CODE_STATUS_DRAFT = "draft", - CODE_STATUS_ACTIVE = "active", - CODE_STATUS_CANCELLED = "cancelled", - CODE_STATUS_ENTERED_IN_ERROR = "entered-in-error" -} -# FHIR PASClaimResponseBaseItemDetailSubDetail datatype record. +# FHIR PASClaimResponseBaseError datatype record. # -# + subDetailSequence - A number to uniquely reference the claim sub-detail entry. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + subDetailSequence - The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. +# + itemSequence - The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. +# + extension - An Extension +# + code - An error code, from a specified code system, which details why the claim could not be adjudicated. +# + detailSequence - The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. + @r4:DataTypeDefinition { - name: "PASClaimResponseBaseItemDetailSubDetail", + name: "PASClaimResponseBaseError", baseType: (), elements: { "subDetailSequence": { name: "subDetailSequence", dataType: r4:positiveInt, - min: 1, + min: 0, max: 1, isArray: false, - description: "A number to uniquely reference the claim sub-detail entry.", - path: "ClaimResponse.item.detail.subDetail.subDetailSequence" + description: "The sequence number of the sub-detail within the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", + path: "ClaimResponse.error.subDetailSequence" + }, + + "itemSequence": { + name: "itemSequence", + dataType: r4:positiveInt, + min: 0, + max: 1, + isArray: false, + description: "The sequence number of the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", + path: "ClaimResponse.error.itemSequence" }, + "extension": { name: "extension", dataType: r4:Extension, min: 0, max: int:MAX_VALUE, isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.item.detail.subDetail.extension" + description: "An Extension", + path: "ClaimResponse.error.extension" + }, + + "code": { + name: "code", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "An error code, from a specified code system, which details why the claim could not be adjudicated.", + path: "ClaimResponse.error.code" + }, + + "detailSequence": { + name: "detailSequence", + dataType: r4:positiveInt, + min: 0, + max: 1, + isArray: false, + description: "The sequence number of the detail within the line item submitted which contains the error. This value is omitted when the error occurs outside of the item structure.", + path: "ClaimResponse.error.detailSequence" }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -1744,8 +2525,9 @@ public enum PASClaimResponseBaseStatus { max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.item.detail.subDetail.modifierExtension" + path: "ClaimResponse.error.modifierExtension" }, + "id": { name: "id", dataType: string, @@ -1753,16 +2535,7 @@ public enum PASClaimResponseBaseStatus { max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.item.detail.subDetail.id" - }, - "noteNumber": { - name: "noteNumber", - dataType: r4:positiveInt, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "The numbers associated with notes below which apply to the adjudication of this item.", - path: "ClaimResponse.item.detail.subDetail.noteNumber" + path: "ClaimResponse.error.id" } }, serializers: { @@ -1770,36 +2543,61 @@ public enum PASClaimResponseBaseStatus { 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseBaseItemDetailSubDetail record {| + +public type PASClaimResponseBaseError record {| *r4:BackboneElement; - r4:positiveInt subDetailSequence; + r4:positiveInt subDetailSequence?; + r4:positiveInt itemSequence?; r4:Extension[] extension?; + r4:CodeableConcept code; + r4:positiveInt detailSequence?; r4:Extension[] modifierExtension?; string id?; - r4:positiveInt[] noteNumber?; |}; -# FHIR PASClaimResponseBaseTotal datatype record. + +# PASClaimResponseBaseStatus enum +public enum PASClaimResponseBaseStatus { + CODE_STATUS_DRAFT = "draft", + CODE_STATUS_ACTIVE = "active", + CODE_STATUS_CANCELLED = "cancelled", + CODE_STATUS_ENTERED_IN_ERROR = "entered-in-error" +} + +# FHIR PASClaimResponseBaseItemDetailSubDetail datatype record. # -# + amount - Monetary total amount associated with the category. +# + adjudication - The adjudication results. +# + subDetailSequence - A number to uniquely reference the claim sub-detail entry. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + category - A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item. +# + noteNumber - The numbers associated with notes below which apply to the adjudication of this item. + @r4:DataTypeDefinition { - name: "PASClaimResponseBaseTotal", + name: "PASClaimResponseBaseItemDetailSubDetail", baseType: (), elements: { - "amount": { - name: "amount", - dataType: r4:Money, + "adjudication": { + name: "adjudication", + dataType: international401:ClaimResponseItemAdjudication, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The adjudication results.", + path: "ClaimResponse.item.detail.subDetail.adjudication" + }, + + "subDetailSequence": { + name: "subDetailSequence", + dataType: r4:positiveInt, min: 1, max: 1, isArray: false, - description: "Monetary total amount associated with the category.", - path: "ClaimResponse.total.amount" + description: "A number to uniquely reference the claim sub-detail entry.", + path: "ClaimResponse.item.detail.subDetail.subDetailSequence" }, + "extension": { name: "extension", dataType: r4:Extension, @@ -1807,8 +2605,9 @@ public type PASClaimResponseBaseItemDetailSubDetail record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "ClaimResponse.total.extension" + path: "ClaimResponse.item.detail.subDetail.extension" }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -1816,8 +2615,9 @@ public type PASClaimResponseBaseItemDetailSubDetail record {| max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "ClaimResponse.total.modifierExtension" + path: "ClaimResponse.item.detail.subDetail.modifierExtension" }, + "id": { name: "id", dataType: string, @@ -1825,45 +2625,35 @@ public type PASClaimResponseBaseItemDetailSubDetail record {| max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "ClaimResponse.total.id" + path: "ClaimResponse.item.detail.subDetail.id" }, - "category": { - name: "category", - dataType: r4:CodeableConcept, - min: 1, - max: 1, - isArray: false, - description: "A code to indicate the information type of this adjudication record. Information types may include: the value submitted, maximum values or percentages allowed or payable under the plan, amounts that the patient is responsible for in aggregate or pertaining to this item, amounts paid by other coverages, and the benefit payable for this item.", - path: "ClaimResponse.total.category" + + "noteNumber": { + name: "noteNumber", + dataType: r4:positiveInt, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "The numbers associated with notes below which apply to the adjudication of this item.", + path: "ClaimResponse.item.detail.subDetail.noteNumber" } }, + serializers: { 'xml: r4:complexDataTypeXMLSerializer, 'json: r4:complexDataTypeJsonSerializer } } -public type PASClaimResponseBaseTotal record {| + +public type PASClaimResponseBaseItemDetailSubDetail record {| *r4:BackboneElement; - r4:Money amount; - r4:Extension[] extension?; - r4:Extension[] modifierExtension?; + international401:ClaimResponseItemAdjudication [] adjudication?; + r4:positiveInt subDetailSequence; + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; string id?; - r4:CodeableConcept category; + r4:positiveInt [] noteNumber?; |}; -# PASClaimResponseBaseUse enum -public enum PASClaimResponseBaseUse { - CODE_USE_PREDETERMINATION = "predetermination", - CODE_USE_PREAUTHORIZATION = "preauthorization", - CODE_USE_CLAIM = "claim" -} - -# PASClaimResponseBaseOutcome enum -public enum PASClaimResponseBaseOutcome { - CODE_OUTCOME_QUEUED = "queued", - CODE_OUTCOME_COMPLETE = "complete", - CODE_OUTCOME_ERROR = "error", - CODE_OUTCOME_PARTIAL = "partial" -} diff --git a/davincipas/resource_pasclaim_update.bal b/davincipas/resource_pasclaim_update.bal index e6491468..f09ee014 100644 --- a/davincipas/resource_pasclaim_update.bal +++ b/davincipas/resource_pasclaim_update.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -23,28 +23,13 @@ import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASCLAIMUPDATE = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-claim-update"; public const RESOURCE_NAME_PASCLAIMUPDATE = "Claim"; +public type PASClaimUpdateExtensions (r4:Extension | ExtensionCertificationType | ExtensionConditionCode | ExtensionHomeHealthCareInformation | ExtensionItemCertificationEffectiveDate | ExtensionItemCertificationExpirationDate | ExtensionItemCertificationIssueDate | ExtensionLevelOfServiceCode ); + # FHIR PASClaimUpdate resource record. # # + resourceType - The type of the resource describes # + insurance - Financial instruments for reimbursement for the health care products and services specified on the claim. # + extension - An Extension -# * extension Slicings -# 1) Extension: Used to provide required information about home health care services. (CR6) -# - min = 0 -# - max = 1 -# -# 2) Extension: A code specifying the level of service being requested (UM06) -# - min = 0 -# - max = 1 -# -# 3) Extension: Information about a hospital claim being requested. -# - min = 0 -# - max = 1 -# -# 4) Extension: Used to indicate condition codes for various requests for service. -# - min = 0 -# - max = * -# # + use - A code to indicate whether the nature of the request is: to request adjudication of products and services previously rendered; or requesting authorization and adjudication for provision in the future; or requesting the non-binding adjudication of the listed products and services which could be provided in the future. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + language - The base language in which the resource is written. @@ -191,8 +176,8 @@ public const RESOURCE_NAME_PASCLAIMUPDATE = "Claim"; "related" : { name: "related", dataType: PASClaimUpdateRelated, - min: 0, - max: int:MAX_VALUE, + min: 1, + max: 1, isArray: true, path: "Claim.related" }, @@ -273,8 +258,8 @@ public const RESOURCE_NAME_PASCLAIMUPDATE = "Claim"; name: "identifier", dataType: r4:Identifier, min: 1, - max: 1, - isArray: false, + max: 2, + isArray: true, path: "Claim.identifier" }, "item" : { @@ -412,7 +397,10 @@ public type PASClaimUpdate record {| RESOURCE_NAME_PASCLAIMUPDATE resourceType = RESOURCE_NAME_PASCLAIMUPDATE; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.insurance constraint. This field must be an array containing at least one item." + } } PASClaimUpdateInsurance[] insurance; r4:Extension[] extension?; @@ -423,7 +411,17 @@ public type PASClaimUpdate record {| PASClaimUpdateAccident accident?; PASClaimUpdatePayee payee?; r4:Money total?; - PASClaimUpdateRelated[] related?; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.related constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.related constraint. This field must be an array containing at most one item." + } + } + PASClaimUpdateRelated [] related; PASClaimUpdateSupportingInfo[] supportingInfo?; r4:CodeableConcept fundsReserve?; r4:Reference provider; @@ -433,9 +431,22 @@ public type PASClaimUpdate record {| string id?; r4:Narrative text?; PASClaimUpdateCareTeam[] careTeam?; - ProfileIdentifier identifier; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.identifier constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.identifier constraint. This field must be an array containing at most one item." + } + } + ProfileIdentifier [] identifier; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.item constraint. This field must be an array containing at least one item." + } } PASClaimUpdateItem[] item; r4:dateTime created; @@ -455,6 +466,59 @@ public type PASClaimUpdate record {| r4:Element ...; |}; +# PASClaimUpdateIdentifierUse enum +public enum PASClaimUpdateIdentifierUse { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + +# FHIR PASClaimUpdateRelatedRelationshipCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASClaimUpdateRelatedRelationshipCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Claim.related.relationship.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Claim.related.relationship.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimUpdateRelatedRelationshipCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/ex-relatedclaimrelationship"; + r4:code code = "prior"; +|}; + + # FHIR PASClaimUpdateItemDetailSubDetail datatype record. # # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. @@ -668,7 +732,7 @@ public type PASClaimUpdateItemDetailSubDetail record {| "claim": { name: "claim", dataType: r4:Reference, - min: 0, + min: 1, max: 1, isArray: false, description: "Reference to a related claim.", @@ -685,8 +749,8 @@ public type PASClaimUpdateItemDetailSubDetail record {| }, "relationship": { name: "relationship", - dataType: r4:CodeableConcept, - min: 0, + dataType: PASClaimUpdateRelatedRelationship, + min: 1, max: 1, isArray: false, description: "A code to convey how the claims are related.", @@ -704,9 +768,9 @@ public type PASClaimUpdateRelated record {| r4:Identifier reference?; r4:Extension[] extension?; r4:Extension[] modifierExtension?; - r4:Reference claim?; + r4:Reference claim; string id?; - r4:CodeableConcept relationship?; + PASClaimUpdateRelatedRelationship relationship; |}; # FHIR PASClaimUpdateCareTeamOverallClaimMember datatype record. @@ -718,7 +782,6 @@ public type PASClaimUpdateRelated record {| # + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + responsible - The party who is billing and/or responsible for the claimed products or services. -# + careTeamClaimScope - A flag that indicates whether the care team applies to the entire claim or a single item. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. @r4:DataTypeDefinition { name: "PASClaimUpdateCareTeamOverallClaimMember", @@ -787,15 +850,7 @@ public type PASClaimUpdateRelated record {| description: "The party who is billing and/or responsible for the claimed products or services.", path: "Claim.careTeam.responsible" }, - "careTeamClaimScope": { - name: "careTeamClaimScope", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A flag that indicates whether the care team applies to the entire claim or a single item.", - path: "Claim.careTeam.extension" - }, + "id": { name: "id", dataType: string, @@ -817,18 +872,20 @@ public type PASClaimUpdateCareTeamOverallClaimMember record {| r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; r4:Reference provider; r4:Extension[] modifierExtension?; boolean responsible?; - @constraint:Array { - minLength: 1, - maxLength: 1 - } - r4:Extension[] careTeamClaimScope; string id?; |}; @@ -1066,7 +1123,7 @@ public type PASClaimUpdateInsurance record {| "timingPeriod": { name: "timingPeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -1084,7 +1141,7 @@ public type PASClaimUpdateInsurance record {| "timingDate": { name: "timingDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -1158,9 +1215,9 @@ public type PASClaimUpdateSupportingInfoPatientEvent record {| r4:Extension[] extension?; r4:CodeableConcept code?; r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:date timingDate?; r4:positiveInt sequence; r4:Attachment valueAttachment?; string valueString?; @@ -1195,7 +1252,14 @@ public type PASClaimUpdateSupportingInfoCategoryFour record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimUpdateSupportingInfoCategoryCodingFour[] coding; |}; @@ -1283,6 +1347,49 @@ public type PASClaimUpdateAccident record {| r4:CodeableConcept 'type?; |}; + +# FHIR PASClaimUpdateRelatedRelationship datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASClaimUpdateRelatedRelationship", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASClaimUpdateRelatedRelationshipCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Claim.related.relationship.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASClaimUpdateRelatedRelationship record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.related.relationship.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.related.relationship.coding constraint. This field must be an array containing at most one item." + } + } + PASClaimUpdateRelatedRelationshipCoding [] coding; +|}; + + # FHIR PASClaimUpdateSupportingInfoMessageText datatype record. # # + timingDate - The date when or period to which this information refers. @@ -1347,7 +1454,7 @@ public type PASClaimUpdateAccident record {| "valueString": { name: "valueString", dataType: string, - min: 1, + min: 0, max: 1, isArray: false, description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", @@ -1403,7 +1510,7 @@ public type PASClaimUpdateSupportingInfoMessageText record {| r4:positiveInt sequence; r4:Extension[] extension?; r4:CodeableConcept code?; - string valueString; + string valueString?; r4:Period timingPeriod?; r4:Extension[] modifierExtension?; string id?; @@ -1436,7 +1543,14 @@ public type PASClaimUpdateSupportingInfoCategoryOne record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimUpdateSupportingInfoCategoryCodingOne[] coding; |}; @@ -1799,7 +1913,14 @@ public type PASClaimUpdateSupportingInfoCategory record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimUpdateSupportingInfoCategoryCoding[] coding; |}; @@ -1868,7 +1989,7 @@ public type PASClaimUpdateSupportingInfoCategory record {| "valueReference": { name: "valueReference", dataType: r4:Reference, - min: 1, + min: 0, max: 1, isArray: false, description: "Additional data or information such as resources, documents, images etc. including references to the data or the actual inclusion of the data.", @@ -1924,7 +2045,7 @@ public type PASClaimUpdateSupportingInfoAdditionalInformation record {| r4:positiveInt sequence; r4:Extension[] extension?; r4:CodeableConcept code?; - r4:Reference valueReference; + r4:Reference valueReference?; r4:Period timingPeriod?; r4:Extension[] modifierExtension?; string id?; @@ -1999,7 +2120,7 @@ public type PASClaimUpdateSupportingInfoAdditionalInformation record {| "timingPeriod": { name: "timingPeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -2017,7 +2138,7 @@ public type PASClaimUpdateSupportingInfoAdditionalInformation record {| "timingDate": { name: "timingDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -2091,9 +2212,9 @@ public type PASClaimUpdateSupportingInfoDischargeDates record {| r4:Extension[] extension?; r4:CodeableConcept code?; r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:date timingDate?; r4:positiveInt sequence; r4:Attachment valueAttachment?; string valueString?; @@ -2155,7 +2276,7 @@ public enum PASClaimUpdateStatus { "procedureCodeableConcept": { name: "procedureCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", @@ -2173,7 +2294,7 @@ public enum PASClaimUpdateStatus { "procedureReference": { name: "procedureReference", dataType: r4:Reference, - min: 1, + min: 0, max: 1, isArray: false, description: "The code or reference to a Procedure resource which identifies the clinical intervention performed.", @@ -2218,9 +2339,9 @@ public type PASClaimUpdateProcedure record {| r4:dateTime date?; r4:positiveInt sequence; r4:Extension[] extension?; - r4:CodeableConcept procedureCodeableConcept; + r4:CodeableConcept procedureCodeableConcept?; r4:Extension[] modifierExtension?; - r4:Reference procedureReference; + r4:Reference procedureReference?; string id?; r4:Reference[] udi?; r4:CodeableConcept[] 'type?; @@ -2235,7 +2356,6 @@ public type PASClaimUpdateProcedure record {| # + provider - Member of the team who provided the product or service. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + responsible - The party who is billing and/or responsible for the claimed products or services. -# + careTeamClaimScope - A flag that indicates whether the care team applies to the entire claim or a single item. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. @r4:DataTypeDefinition { name: "PASClaimUpdateCareTeamItemClaimMember", @@ -2304,15 +2424,7 @@ public type PASClaimUpdateProcedure record {| description: "The party who is billing and/or responsible for the claimed products or services.", path: "Claim.careTeam.responsible" }, - "careTeamClaimScope": { - name: "careTeamClaimScope", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A flag that indicates whether the care team applies to the entire claim or a single item.", - path: "Claim.careTeam.extension" - }, + "id": { name: "id", dataType: string, @@ -2334,18 +2446,20 @@ public type PASClaimUpdateCareTeamItemClaimMember record {| r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; r4:Reference provider; r4:Extension[] modifierExtension?; boolean responsible?; - @constraint:Array { - minLength: 1, - maxLength: 1 - } - r4:Extension[] careTeamClaimScope; string id?; |}; @@ -2632,14 +2746,14 @@ public type PASClaimUpdateSupportingInfo record {| dataType: r4:CodeableConcept, min: 0, max: 1, - isArray: false, + isArray: true, description: "When the condition was observed or the relative ranking.", path: "Claim.diagnosis.type" }, "diagnosisCodeableConcept": { name: "diagnosisCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, description: "The nature of illness or problem in a coded form or as a reference to an external defined Condition.", @@ -2660,8 +2774,14 @@ public type PASClaimUpdateDiagnosis record {| r4:CodeableConcept packageCode?; r4:Extension[] modifierExtension?; string id?; - r4:CodeableConcept 'type?; - r4:CodeableConcept diagnosisCodeableConcept; + @constraint:Array { + maxLength: { + value: 1, + message: "Validation failed for $.Claim.diagnosis.type constraint. This field must be an array containing at most one item." + } + } + r4:CodeableConcept [] 'type?; + r4:CodeableConcept diagnosisCodeableConcept?; |}; # FHIR PASClaimUpdateSupportingInfoAdmissionDates datatype record. @@ -2732,7 +2852,7 @@ public type PASClaimUpdateDiagnosis record {| "timingPeriod": { name: "timingPeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -2750,7 +2870,7 @@ public type PASClaimUpdateDiagnosis record {| "timingDate": { name: "timingDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The date when or period to which this information refers.", @@ -2824,9 +2944,9 @@ public type PASClaimUpdateSupportingInfoAdmissionDates record {| r4:Extension[] extension?; r4:CodeableConcept code?; r4:Reference valueReference?; - r4:Period timingPeriod; + r4:Period timingPeriod?; r4:Extension[] modifierExtension?; - r4:date timingDate; + r4:date timingDate?; r4:positiveInt sequence; r4:Attachment valueAttachment?; string valueString?; @@ -2889,7 +3009,7 @@ public type PASClaimUpdateSupportingInfoCategoryCodingTwo record {| # + factor - A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount. # + net - The quantity times the unit price for an additional service or product or charge. # + unitPrice - If the item is not a group then this is the fee for the product or service, otherwise this is the total of the fees for the details of the group. -# + quantity - The number of repetitions of a service or product. +# + quantity - The comparator is not used on a SimpleQuantity # + programCode - Identifies the program under which this may be recovered. # + careTeamSequence - CareTeam members related to this service or product. # + encounter - The Encounters during which this Claim was created or to which the creation of this record is tightly associated. @@ -2908,7 +3028,7 @@ public type PASClaimUpdateSupportingInfoCategoryCodingTwo record {| "extension": { name: "extension", dataType: r4:Extension, - min: 0, + min: 2, max: int:MAX_VALUE, isArray: true, description: "An Extension", @@ -3028,7 +3148,7 @@ public type PASClaimUpdateSupportingInfoCategoryCodingTwo record {| min: 0, max: 1, isArray: false, - description: "The number of repetitions of a service or product.", + description: "The comparator is not used on a SimpleQuantity", path: "Claim.item.quantity" }, "programCode": { @@ -3139,7 +3259,17 @@ public type PASClaimUpdateSupportingInfoCategoryCodingTwo record {| public type PASClaimUpdateItem record {| *r4:BackboneElement; - r4:Extension[] extension?; + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Claim.item.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.item.extension constraint. This field must be an array containing at most one item." + } + } + r4:Extension [] extension; r4:CodeableConcept[] modifier?; r4:Extension[] modifierExtension?; r4:CodeableConcept productOrService; @@ -3192,7 +3322,14 @@ public type PASClaimUpdateSupportingInfoCategoryTwo record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimUpdateSupportingInfoCategoryCodingTwo[] coding; |}; @@ -3223,7 +3360,14 @@ public type PASClaimUpdateSupportingInfoCategoryThree record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.supportingInfo.category.coding constraint. This field must be an array containing at most one item." + } } PASClaimUpdateSupportingInfoCategoryCodingThree[] coding; |}; @@ -3333,7 +3477,14 @@ public type PASClaimUpdateCareTeam record {| r4:CodeableConcept qualification?; r4:positiveInt sequence; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Claim.careTeam.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:CodeableConcept role?; diff --git a/davincipas/resource_pascommunication_request.bal b/davincipas/resource_pascommunication_request.bal index cc4082ac..9c4c6247 100644 --- a/davincipas/resource_pascommunication_request.bal +++ b/davincipas/resource_pascommunication_request.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -382,7 +382,7 @@ public type PASCommunicationRequest record {| "contentString": { name: "contentString", dataType: string, - min: 1, + min: 0, max: 1, isArray: false, description: "The communicated content (or for multi-part communications, one portion of the communication).", @@ -416,7 +416,7 @@ public type PASCommunicationRequestPayload record {| *r4:BackboneElement; r4:Extension[] extension?; - string contentString; + string contentString?; r4:Extension[] modifierExtension?; string id?; |}; diff --git a/davincipas/resource_pascoverage.bal b/davincipas/resource_pascoverage.bal index 8b6b9793..43e1a848 100644 --- a/davincipas/resource_pascoverage.bal +++ b/davincipas/resource_pascoverage.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -37,9 +37,23 @@ public const RESOURCE_NAME_PASCOVERAGE = "Coverage"; # + text - A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. # + relationship - The relationship of beneficiary (patient) to the subscriber. # + 'class - A suite of underwriter specific classifiers. + # * class Slicings + # 1) PASCoverageClassPlan: Plan + # - min = 0 + # - max = 1 + # + # 2) PASCoverageClassGroup: Group + # - min = 0 + # - max = 1 + # # + dependent - A unique identifier for a dependent under the coverage. # + 'order - The order of applicability of this coverage relative to other coverages which are currently in force. Note, there may be gaps in the numbering and this does not imply primary, secondary etc. as the specific positioning of coverages depends upon the episode of care. # + identifier - A unique identifier assigned to this coverage. + # * identifier Slicings + # 1) PASCoverageIdentifierMemberid: Member ID + # - min = 0 + # - max = 1 + # # + costToBeneficiary - A suite of codes indicating the cost category and associated amount which have been detailed in the policy and may have been included on the health card. # + period - Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force. # + subscriber - The party who has signed-up for or 'owns' the contractual relationship to the policy or to whom the benefit of the policy for services rendered to them or their family is due. @@ -96,7 +110,7 @@ public const RESOURCE_NAME_PASCOVERAGE = "Coverage"; max: 1, isArray: false, path: "Coverage.type", - valueSet: "http://hl7.org/fhir/ValueSet/coverage-type" + valueSet: "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591" }, "network" : { name: "network", @@ -110,7 +124,7 @@ public const RESOURCE_NAME_PASCOVERAGE = "Coverage"; name: "payor", dataType: r4:Reference, min: 1, - max: int:MAX_VALUE, + max: 1, isArray: true, path: "Coverage.payor" }, @@ -133,7 +147,7 @@ public const RESOURCE_NAME_PASCOVERAGE = "Coverage"; "relationship" : { name: "relationship", dataType: PASCoverageRelationship, - min: 0, + min: 1, max: 1, isArray: false, path: "Coverage.relationship", @@ -278,12 +292,19 @@ public type PASCoverage record {| r4:CodeableConcept 'type?; string network?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Coverage.payor constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Coverage.payor constraint. This field must be an array containing at most one item." + } } r4:Reference[] payor; string id?; r4:Narrative text?; - PASCoverageRelationship relationship?; + PASCoverageRelationship relationship; PASCoverageClass[] 'class?; string dependent?; r4:positiveInt 'order?; @@ -310,15 +331,17 @@ public enum PASCoverageStatus { CODE_STATUS_ENTERED_IN_ERROR = "entered-in-error" } -# FHIR PASCoverageCostToBeneficiaryException datatype record. +# FHIR PASCoverageClassGroup datatype record. # # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + period - The timeframe during when the exception is in force. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + name - A short description for the class. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - The code for the specific exception. +# + 'type - The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan. +# + value - The alphanumeric string value associated with the insurer issued label. + @r4:DataTypeDefinition { - name: "PASCoverageCostToBeneficiaryException", + name: "PASCoverageClassGroup", baseType: (), elements: { "extension": { @@ -328,16 +351,7 @@ public enum PASCoverageStatus { max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Coverage.costToBeneficiary.exception.extension" - }, - "period": { - name: "period", - dataType: r4:Period, - min: 0, - max: 1, - isArray: false, - description: "The timeframe during when the exception is in force.", - path: "Coverage.costToBeneficiary.exception.period" + path: "Coverage.class.extension" }, "modifierExtension": { name: "modifierExtension", @@ -346,8 +360,19 @@ public enum PASCoverageStatus { max: int:MAX_VALUE, isArray: true, description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Coverage.costToBeneficiary.exception.modifierExtension" + path: "Coverage.class.modifierExtension" + }, + + "name": { + name: "name", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "A short description for the class.", + path: "Coverage.class.name" }, + "id": { name: "id", dataType: string, @@ -355,16 +380,26 @@ public enum PASCoverageStatus { max: 1, isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Coverage.costToBeneficiary.exception.id" + path: "Coverage.class.id" }, "type": { name: "type", - dataType: r4:CodeableConcept, + dataType: PASCoverageClassTypeOne, min: 1, max: 1, isArray: false, - description: "The code for the specific exception.", - path: "Coverage.costToBeneficiary.exception.type" + description: "The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan.", + path: "Coverage.class.type" + }, + + "value": { + name: "value", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "The alphanumeric string value associated with the insurer issued label.", + path: "Coverage.class.value" } }, serializers: { @@ -372,17 +407,20 @@ public enum PASCoverageStatus { 'json: r4:complexDataTypeJsonSerializer } } -public type PASCoverageCostToBeneficiaryException record {| - *r4:BackboneElement; + +public type PASCoverageClassGroup record {| + *PASCoverageClass; r4:Extension[] extension?; - r4:Period period?; r4:Extension[] modifierExtension?; + string name?; string id?; - r4:CodeableConcept 'type; + PASCoverageClassTypeOne 'type; + string value; |}; -# FHIR PASCoverageClass datatype record. + +# FHIR PASCoverageClassPlan datatype record. # # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). @@ -391,7 +429,7 @@ public type PASCoverageCostToBeneficiaryException record {| # + 'type - The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan. # + value - The alphanumeric string value associated with the insurer issued label. @r4:DataTypeDefinition { - name: "PASCoverageClass", + name: "PASCoverageClassPlan", baseType: (), elements: { "extension": { @@ -432,7 +470,7 @@ public type PASCoverageCostToBeneficiaryException record {| }, "type": { name: "type", - dataType: r4:CodeableConcept, + dataType: PASCoverageClassType, min: 1, max: 1, isArray: false, @@ -454,62 +492,46 @@ public type PASCoverageCostToBeneficiaryException record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASCoverageClass record {| - *r4:BackboneElement; + +public type PASCoverageClassPlan record {| + *PASCoverageClass; r4:Extension[] extension?; r4:Extension[] modifierExtension?; string name?; string id?; - r4:CodeableConcept 'type; + PASCoverageClassType 'type; string value; |}; -# FHIR PASCoverageRelationship datatype record. + +# FHIR PASCoverageClassTypeCodingOne datatype record. # -# + coding - A reference to a code defined by a terminology system. -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + text - A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user. +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + @r4:DataTypeDefinition { - name: "PASCoverageRelationship", + name: "PASCoverageClassTypeCodingOne", baseType: (), elements: { - "coding": { - name: "coding", - dataType: r4:Coding, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "A reference to a code defined by a terminology system.", - path: "Coverage.relationship.coding" - }, - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Coverage.relationship.extension" - }, - "id": { - name: "id", - dataType: string, - min: 0, + "system": { + name: "system", + dataType: r4:uri, + min: 1, max: 1, isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Coverage.relationship.id" + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Coverage.class.type.coding.system" }, - "text": { - name: "text", - dataType: string, - min: 0, + + "code": { + name: "code", + dataType: r4:code, + min: 1, max: 1, isArray: false, - description: "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", - path: "Coverage.relationship.text" + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Coverage.class.type.coding.code" } }, serializers: { @@ -517,13 +539,12 @@ public type PASCoverageClass record {| 'json: r4:complexDataTypeJsonSerializer } } -public type PASCoverageRelationship record {| - *r4:CodeableConcept; - r4:Coding[] coding?; - r4:Extension[] extension?; - string id?; - string text?; +public type PASCoverageClassTypeCodingOne record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/coverage-class"; + r4:code code = "group"; |}; # FHIR PASCoverageRelationshipCodingX12Code datatype record. @@ -577,7 +598,7 @@ public type PASCoverageRelationshipCodingX12Code record {| "valueMoney": { name: "valueMoney", dataType: r4:Money, - min: 1, + min: 0, max: 1, isArray: false, description: "The amount due from the patient for the cost category.", @@ -613,7 +634,7 @@ public type PASCoverageRelationshipCodingX12Code record {| "valueQuantity": { name: "valueQuantity", dataType: r4:Quantity, - min: 1, + min: 0, max: 1, isArray: false, description: "The amount due from the patient for the cost category.", @@ -630,10 +651,590 @@ public type PASCoverageCostToBeneficiary record {| PASCoverageCostToBeneficiaryException[] exception?; r4:Extension[] extension?; - r4:Money valueMoney; + r4:Money valueMoney?; r4:Extension[] modifierExtension?; string id?; r4:CodeableConcept 'type?; - r4:Quantity valueQuantity; + r4:Quantity valueQuantity?; +|}; + + +# FHIR PASCoverageIdentifierMemberid datatype record. +# +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + period - Time period during which identifier is/was valid for use. +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. +# + use - The purpose of this identifier. +# + assigner - Organization that issued/manages the identifier. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. +# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. + +@r4:DataTypeDefinition { + name: "PASCoverageIdentifierMemberid", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Coverage.identifier.extension" + }, + + "period": { + name: "period", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "Time period during which identifier is/was valid for use.", + path: "Coverage.identifier.period" + }, + + "system": { + name: "system", + dataType: r4:uri, + min: 0, + max: 1, + isArray: false, + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Coverage.identifier.system" + }, + + "use": { + name: "use", + dataType: PASCoverageIdentifierUse, + min: 0, + max: 1, + isArray: false, + description: "The purpose of this identifier.", + path: "Coverage.identifier.use" + }, + + "assigner": { + name: "assigner", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "Organization that issued/manages the identifier.", + path: "Coverage.identifier.assigner" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Coverage.identifier.id" + }, + + "type": { + name: "type", + dataType: PASCoverageIdentifierType, + min: 1, + max: 1, + isArray: false, + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "Coverage.identifier.type" + }, + + "value": { + name: "value", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", + path: "Coverage.identifier.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASCoverageIdentifierMemberid record {| + *r4:Identifier; + + r4:Extension [] extension?; + r4:Period period?; + r4:uri system?; + PASCoverageIdentifierUse use?; + r4:Reference assigner?; + string id?; + PASCoverageIdentifierType 'type; + string value?; +|}; + + +# FHIR PASCoverageClassTypeCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASCoverageClassTypeCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Coverage.class.type.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Coverage.class.type.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASCoverageClassTypeCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/coverage-class"; + r4:code code = "plan"; |}; + +# FHIR PASCoverageIdentifierType datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASCoverageIdentifierType", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASCoverageIdentifierTypeCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Coverage.identifier.type.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASCoverageIdentifierType record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Coverage.identifier.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Coverage.identifier.type.coding constraint. This field must be an array containing at most one item." + } + } + PASCoverageIdentifierTypeCoding [] coding; +|}; + + +# FHIR PASCoverageIdentifierTypeCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASCoverageIdentifierTypeCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Coverage.identifier.type.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Coverage.identifier.type.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASCoverageIdentifierTypeCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/v2-0203"; + r4:code code = "MB"; +|}; + + +# PASCoverageIdentifierUse enum +public enum PASCoverageIdentifierUse { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + +# FHIR PASCoverageClassType datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASCoverageClassType", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASCoverageClassTypeCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Coverage.class.type.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASCoverageClassType record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Coverage.class.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Coverage.class.type.coding constraint. This field must be an array containing at most one item." + } + } + PASCoverageClassTypeCoding [] coding; +|}; + + +# FHIR PASCoverageCostToBeneficiaryException datatype record. +# +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + period - The timeframe during when the exception is in force. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - The code for the specific exception. + +@r4:DataTypeDefinition { + name: "PASCoverageCostToBeneficiaryException", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Coverage.costToBeneficiary.exception.extension" + }, + + "period": { + name: "period", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "The timeframe during when the exception is in force.", + path: "Coverage.costToBeneficiary.exception.period" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Coverage.costToBeneficiary.exception.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Coverage.costToBeneficiary.exception.id" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "The code for the specific exception.", + path: "Coverage.costToBeneficiary.exception.type" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASCoverageCostToBeneficiaryException record {| + *r4:BackboneElement; + + r4:Extension [] extension?; + r4:Period period?; + r4:Extension [] modifierExtension?; + string id?; + r4:CodeableConcept 'type; +|}; + + +# FHIR PASCoverageClass datatype record. +# +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + name - A short description for the class. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan. +# + value - The alphanumeric string value associated with the insurer issued label. + +@r4:DataTypeDefinition { + name: "PASCoverageClass", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Coverage.class.extension" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Coverage.class.modifierExtension" + }, + + "name": { + name: "name", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "A short description for the class.", + path: "Coverage.class.name" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Coverage.class.id" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 1, + max: 1, + isArray: false, + description: "The type of classification for which an insurer-specific class label or number and optional name is provided, for example may be used to identify a class of coverage or employer group, Policy, Plan.", + path: "Coverage.class.type" + }, + + "value": { + name: "value", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "The alphanumeric string value associated with the insurer issued label.", + path: "Coverage.class.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASCoverageClass record {| + *r4:BackboneElement; + + r4:Extension [] extension?; + r4:Extension [] modifierExtension?; + string name?; + string id?; + r4:CodeableConcept 'type; + string value; +|}; + + +# FHIR PASCoverageRelationship datatype record. +# +# + coding - A reference to a code defined by a terminology system. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + text - A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user. + +@r4:DataTypeDefinition { + name: "PASCoverageRelationship", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: r4:Coding, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Coverage.relationship.coding" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Coverage.relationship.extension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Coverage.relationship.id" + }, + + "text": { + name: "text", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.", + path: "Coverage.relationship.text" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASCoverageRelationship record {| + *r4:CodeableConcept; + + r4:Coding [] coding?; + r4:Extension [] extension?; + string id?; + string text?; +|}; + + +# FHIR PASCoverageClassTypeOne datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASCoverageClassTypeOne", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASCoverageClassTypeCodingOne, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Coverage.class.type.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASCoverageClassTypeOne record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Coverage.class.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Coverage.class.type.coding constraint. This field must be an array containing at most one item." + } + } + PASCoverageClassTypeCodingOne [] coding; +|}; + + diff --git a/davincipas/resource_pasdevice_request.bal b/davincipas/resource_pasdevice_request.bal index 5eede925..93972bdf 100644 --- a/davincipas/resource_pasdevice_request.bal +++ b/davincipas/resource_pasdevice_request.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -28,11 +28,6 @@ public const RESOURCE_NAME_PASDEVICEREQUEST = "DeviceRequest"; # + insurance - Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service. # + note - Details about this request that were not represented at all or sufficiently in one of the attributes provided in a class. These may include for example a comment, an instruction, or a note associated with the statement. # + extension - An Extension -# * extension Slicings -# 1) Extension: CoverageInfo -# - min = 0 -# - max = 1 -# # + subject - The patient who will use the device. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + reasonReference - Reason or justification for the use of this device. @@ -315,7 +310,7 @@ public const RESOURCE_NAME_PASDEVICEREQUEST = "DeviceRequest"; "codeCodeableConcept" : { name: "codeCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, path: "DeviceRequest.code[x]", @@ -371,7 +366,7 @@ public type PASDeviceRequest record {| r4:Meta meta?; r4:uri implicitRules?; r4:Identifier groupIdentifier?; - r4:CodeableConcept codeCodeableConcept; + r4:CodeableConcept codeCodeableConcept?; PASDeviceRequestStatus status?; r4:Element ...; |}; diff --git a/davincipas/resource_pasencounter.bal b/davincipas/resource_pasencounter.bal index add1afbd..c18ca028 100644 --- a/davincipas/resource_pasencounter.bal +++ b/davincipas/resource_pasencounter.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -23,21 +23,14 @@ import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASENCOUNTER = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-encounter"; public const RESOURCE_NAME_PASENCOUNTER = "Encounter"; +public type PASEncounterExtensions (r4:Extension | ExtensionNursingHomeResidentialStatus | ExtensionPatientStatus ); + # FHIR PASEncounter resource record. # # + resourceType - The type of the resource describes # + serviceType - Broad categorization of the service that is to be provided (e.g. cardiology). # + partOf - Another Encounter of which this encounter is a part of (administratively or in time). # + extension - An Extension -# * extension Slicings -# 1) Extension: Extension -# - min = 0 -# - max = 1 -# -# 2) Extension: Extension -# - min = 0 -# - max = 1 -# # + subject - The patient or group present at the encounter. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + reasonReference - Reason the encounter takes place, expressed as a code. For admissions, this can be used for a coded admission diagnosis. @@ -346,7 +339,10 @@ public type PASEncounter record {| r4:Reference[] appointment?; r4:code language?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Encounter.type constraint. This field must be an array containing at least one item." + } } r4:CodeableConcept[] 'type; PASEncounterParticipant[] participant?; diff --git a/davincipas/resource_pasinsurer.bal b/davincipas/resource_pasinsurer.bal index fe5eb88f..a4bbe02a 100644 --- a/davincipas/resource_pasinsurer.bal +++ b/davincipas/resource_pasinsurer.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,10 +13,12 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. + +import ballerina/constraint; import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASINSURER = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-insurer"; @@ -29,16 +31,24 @@ public const RESOURCE_NAME_PASINSURER = "Organization"; # * identifier Slicings # 1) PASInsurerIdentifierNPI: An identifier intended for computation # - min = 0 -# - max = 1 + # - max = * # -# 2) PASInsurerIdentifierTIN: The US Employer Identification Number (EIN) or Tax Identification Number (TIN). + # 2) PASInsurerIdentifierNAIC: An identifier intended for computation + # - min = 0 + # - max = * + # + # 3) PASInsurerIdentifierTIN: The US Employer Identification Number (EIN) or Tax Identification Number (TIN). # - min = 0 # - max = 1 # -# 3) PASInsurerIdentifierCLIA: An identifier intended for computation + # 4) PASInsurerIdentifierPI: The Payer Identification Number (PI) # - min = 0 # - max = 1 # + # 5) PASInsurerIdentifierCLIA: An identifier intended for computation + # - min = 0 + # - max = * + # # + partOf - The organization of which this organization forms a part. # + extension - May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + address - An address for the organization. @@ -340,6 +350,26 @@ public enum PASInsurerAddressType { CODE_TYPE_BOTH = "both" } +# PASInsurerTelecomUse enum +public enum PASInsurerTelecomUse { + CODE_USE_TEMP = "temp", + CODE_USE_WORK = "work", + CODE_USE_OLD = "old", + CODE_USE_MOBILE = "mobile", + CODE_USE_HOME = "home" +} + +# PASInsurerTelecomSystem enum +public enum PASInsurerTelecomSystem { + CODE_SYSTEM_OTHER = "other", + CODE_SYSTEM_PAGER = "pager", + CODE_SYSTEM_PHONE = "phone", + CODE_SYSTEM_SMS = "sms", + CODE_SYSTEM_FAX = "fax", + CODE_SYSTEM_EMAIL = "email", + CODE_SYSTEM_URL = "url" +} + # FHIR PASInsurerIdentifierNPI datatype record. # # + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. @@ -368,47 +398,47 @@ public type PASInsurerIdentifierNPI record {| r4:uri system = "http://hl7.org/fhir/sid/us-npi"; |}; -# PASInsurerIdentifierUse enum -public enum PASInsurerIdentifierUse { - CODE_USE_SECONDARY = "secondary", - CODE_USE_TEMP = "temp", - CODE_USE_USUAL = "usual", - CODE_USE_OLD = "old", - CODE_USE_OFFICIAL = "official" -} -# FHIR PASInsurerIdentifierTIN datatype record. +# FHIR PASInsurerIdentifierPI datatype record. # -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + period - Time period during which identifier is/was valid for use. -# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. -# + use - The purpose of this identifier. -# + assigner - Organization that issued/manages the identifier. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. # + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. -# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. + @r4:DataTypeDefinition { - name: "PASInsurerIdentifierTIN", + name: "PASInsurerIdentifierPI", baseType: (), elements: { - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Organization.identifier.extension" - }, - "period": { - name: "period", - dataType: r4:Period, - min: 0, + "type": { + name: "type", + dataType: PASInsurerIdentifierType, + min: 1, max: 1, isArray: false, - description: "Time period during which identifier is/was valid for use.", - path: "Organization.identifier.period" + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "Organization.identifier.type" + } }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASInsurerIdentifierPI record {| + *r4:Identifier; + + PASInsurerIdentifierType 'type; +|}; + + +# FHIR PASInsurerIdentifierTIN datatype record. +# +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. + +@r4:DataTypeDefinition { + name: "PASInsurerIdentifierTIN", + baseType: (), + elements: { "system": { name: "system", dataType: r4:uri, @@ -417,51 +447,6 @@ public enum PASInsurerIdentifierUse { isArray: false, description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", path: "Organization.identifier.system" - }, - "use": { - name: "use", - dataType: PASInsurerIdentifierUse, - min: 0, - max: 1, - isArray: false, - description: "The purpose of this identifier.", - path: "Organization.identifier.use" - }, - "assigner": { - name: "assigner", - dataType: r4:Reference, - min: 0, - max: 1, - isArray: false, - description: "Organization that issued/manages the identifier.", - path: "Organization.identifier.assigner" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Organization.identifier.id" - }, - "type": { - name: "type", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", - path: "Organization.identifier.type" - }, - "value": { - name: "value", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", - path: "Organization.identifier.value" } }, serializers: { @@ -472,14 +457,7 @@ public enum PASInsurerIdentifierUse { public type PASInsurerIdentifierTIN record {| *r4:Identifier; - r4:Extension[] extension?; - r4:Period period?; r4:uri system = "http://terminology.hl7.org/NamingSystem/USEIN"; - PASInsurerIdentifierUse use?; - r4:Reference assigner?; - string id?; - r4:CodeableConcept 'type?; - string value?; |}; # FHIR PASInsurerIdentifierCLIA datatype record. @@ -510,6 +488,39 @@ public type PASInsurerIdentifierCLIA record {| r4:uri system = "urn:oid:2.16.840.1.113883.4.7"; |}; + +# FHIR PASInsurerIdentifierNAIC datatype record. +# +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. + +@r4:DataTypeDefinition { + name: "PASInsurerIdentifierNAIC", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Organization.identifier.system" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASInsurerIdentifierNAIC record {| + *r4:Identifier; + + r4:uri system = "urn:oid:2.16.840.1.113883.6.300"; +|}; + + # PASInsurerAddressUse enum public enum PASInsurerAddressUse { CODE_USE_TEMP = "temp", @@ -519,3 +530,89 @@ public enum PASInsurerAddressUse { CODE_USE_BILLING = "billing" } +# FHIR PASInsurerIdentifierTypeCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASInsurerIdentifierTypeCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Organization.identifier.type.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Organization.identifier.type.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASInsurerIdentifierTypeCoding record {| + *r4:Coding; + + r4:uri system = "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType"; + r4:code code = "payerid"; +|}; + + +# FHIR PASInsurerIdentifierType datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASInsurerIdentifierType", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASInsurerIdentifierTypeCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Organization.identifier.type.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASInsurerIdentifierType record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Organization.identifier.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Organization.identifier.type.coding constraint. This field must be an array containing at most one item." + } + } + PASInsurerIdentifierTypeCoding [] coding; +|}; + + diff --git a/davincipas/resource_pasmedication_request.bal b/davincipas/resource_pasmedication_request.bal index 9e49949f..8a7905f7 100644 --- a/davincipas/resource_pasmedication_request.bal +++ b/davincipas/resource_pasmedication_request.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -28,11 +28,6 @@ public const RESOURCE_NAME_PASMEDICATIONREQUEST = "MedicationRequest"; # + insurance - Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be required for delivering the requested service. # + note - Extra information about the prescription that could not be conveyed by the other attributes. # + extension - An Extension -# * extension Slicings -# 1) Extension: CoverageInfo -# - min = 0 -# - max = 1 -# # + substitution - Indicates whether or not substitution can or should be part of the dispense. In some cases, substitution must happen, in other cases substitution must not happen. This block explains the prescriber's intent. If nothing is specified substitution may be done. # + courseOfTherapyType - The description of the overall patte3rn of the administration of the medication to the patient. # + priorPrescription - A link to a resource representing an earlier order related order or prescription. @@ -70,6 +65,11 @@ public const RESOURCE_NAME_PASMEDICATIONREQUEST = "MedicationRequest"; # + eventHistory - Links to Provenance records for past versions of this resource or fulfilling request or event resources that identify key state transitions or updates that are likely to be relevant to a user looking at the current version of the resource. # + implicitRules - A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc. # + category - Indicates the type of medication request (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient)). + # * category Slicings + # 1) PASMedicationRequestCategoryUs_core: Type of medication usage + # - min = 0 + # - max = * + # # + groupIdentifier - A shared identifier common to all requests that were authorized more or less simultaneously by a single author, representing the identifier of the requisition or prescription. # + status - A code specifying the current state of the order. Generally, this will be active or completed state. @r4:ResourceDefinition { @@ -170,11 +170,11 @@ public const RESOURCE_NAME_PASMEDICATIONREQUEST = "MedicationRequest"; "medicationReference" : { name: "medicationReference", dataType: r4:Reference, - min: 1, + min: 0, max: 1, isArray: false, path: "MedicationRequest.medication[x]", - valueSet: "http://hl7.org/fhir/us/core/ValueSet/us-core-medication-codes" + valueSet: "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.4" }, "reportedReference" : { name: "reportedReference", @@ -216,7 +216,7 @@ public const RESOURCE_NAME_PASMEDICATIONREQUEST = "MedicationRequest"; max: int:MAX_VALUE, isArray: true, path: "MedicationRequest.reasonCode", - valueSet: "http://hl7.org/fhir/ValueSet/condition-code" + valueSet: "http://hl7.org/fhir/us/core/ValueSet/us-core-condition-code" }, "text" : { name: "text", @@ -245,7 +245,7 @@ public const RESOURCE_NAME_PASMEDICATIONREQUEST = "MedicationRequest"; "requester" : { name: "requester", dataType: r4:Reference, - min: 1, + min: 0, max: 1, isArray: false, path: "MedicationRequest.requester" @@ -277,7 +277,7 @@ public const RESOURCE_NAME_PASMEDICATIONREQUEST = "MedicationRequest"; "authoredOn" : { name: "authoredOn", dataType: r4:dateTime, - min: 1, + min: 0, max: 1, isArray: false, path: "MedicationRequest.authoredOn" @@ -325,11 +325,11 @@ public const RESOURCE_NAME_PASMEDICATIONREQUEST = "MedicationRequest"; "medicationCodeableConcept" : { name: "medicationCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, path: "MedicationRequest.medication[x]", - valueSet: "http://hl7.org/fhir/us/core/ValueSet/us-core-medication-codes" + valueSet: "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1010.4" }, "priority" : { name: "priority", @@ -446,7 +446,7 @@ public type PASMedicationRequest record {| r4:Reference[] reasonReference?; r4:code language?; r4:uri[] instantiatesUri?; - r4:Reference medicationReference; + r4:Reference medicationReference?; r4:Reference reportedReference?; r4:CodeableConcept statusReason?; PASMedicationRequestDispenseRequest dispenseRequest?; @@ -455,17 +455,17 @@ public type PASMedicationRequest record {| r4:Narrative text?; boolean doNotPerform?; r4:Reference[] basedOn?; - r4:Reference requester; + r4:Reference requester?; r4:Identifier[] identifier?; r4:Reference recorder?; boolean reportedBoolean?; - r4:dateTime authoredOn; + r4:dateTime authoredOn?; r4:Reference performer?; r4:Reference[] detectedIssue?; r4:Reference[] supportingInformation?; r4:Reference encounter?; r4:canonical[] instantiatesCanonical?; - r4:CodeableConcept medicationCodeableConcept; + r4:CodeableConcept medicationCodeableConcept?; PASMedicationRequestPriority priority?; PASMedicationRequestIntent intent; r4:CodeableConcept performerType?; @@ -711,7 +711,7 @@ public type PASMedicationRequestDosageInstruction record {| "allowedCodeableConcept": { name: "allowedCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, description: "True if the prescriber allows a different drug to be dispensed from what was prescribed.", @@ -747,7 +747,7 @@ public type PASMedicationRequestDosageInstruction record {| "allowedBoolean": { name: "allowedBoolean", dataType: boolean, - min: 1, + min: 0, max: 1, isArray: false, description: "True if the prescriber allows a different drug to be dispensed from what was prescribed.", @@ -771,11 +771,11 @@ public type PASMedicationRequestDosageInstruction record {| public type PASMedicationRequestSubstitution record {| *r4:BackboneElement; - r4:CodeableConcept allowedCodeableConcept; + r4:CodeableConcept allowedCodeableConcept?; r4:CodeableConcept reason?; r4:Extension[] extension?; r4:Extension[] modifierExtension?; - boolean allowedBoolean; + boolean allowedBoolean?; string id?; |}; @@ -851,6 +851,28 @@ public type PASMedicationRequestDispenseRequestInitialFill record {| string id?; |}; + +# FHIR PASMedicationRequestCategoryUs_core datatype record. +# + +@r4:DataTypeDefinition { + name: "PASMedicationRequestCategoryUs_core", + baseType: (), + elements: { + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASMedicationRequestCategoryUs_core record {| + *r4:CodeableConcept; + +|}; + + # FHIR PASMedicationRequestDispenseRequest datatype record. # # + validityPeriod - This indicates the validity period of a prescription (stale dating the Prescription). diff --git a/davincipas/resource_pasnutrition_order.bal b/davincipas/resource_pasnutrition_order.bal index f2fc3d2a..4ba7b4bd 100644 --- a/davincipas/resource_pasnutrition_order.bal +++ b/davincipas/resource_pasnutrition_order.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -29,11 +29,6 @@ public const RESOURCE_NAME_PASNUTRITIONORDER = "NutritionOrder"; # + instantiates - The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder. # + note - Comments made about the {{title}} by the requester, performer, subject or other participants. # + extension - An Extension -# * extension Slicings -# 1) Extension: CoverageInfo -# - min = 0 -# - max = 1 -# # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + language - The base language in which the resource is written. # + instantiatesUri - The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder. @@ -308,11 +303,12 @@ public type PASNutritionOrder record {| # # + schedule - The time period and frequency at which the enteral formula should be delivered to the patient. # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + rateRatio - The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule. # + quantity - The volume of formula to provide to the patient per the specified administration schedule. +# + rateQuantity - The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + rateNutritionOrderRatio - The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule. # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + rateNutritionOrderQuantity - The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule. + @r4:DataTypeDefinition { name: "PASNutritionOrderEnteralFormulaAdministration", baseType: (), @@ -335,6 +331,17 @@ public type PASNutritionOrder record {| description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", path: "NutritionOrder.enteralFormula.administration.extension" }, + + "rateRatio": { + name: "rateRatio", + dataType: r4:Ratio, + min: 0, + max: 1, + isArray: false, + description: "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", + path: "NutritionOrder.enteralFormula.administration.rate[x]" + }, + "quantity": { name: "quantity", dataType: r4:Quantity, @@ -344,6 +351,17 @@ public type PASNutritionOrder record {| description: "The volume of formula to provide to the patient per the specified administration schedule.", path: "NutritionOrder.enteralFormula.administration.quantity" }, + + "rateQuantity": { + name: "rateQuantity", + dataType: r4:Quantity, + min: 0, + max: 1, + isArray: false, + description: "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", + path: "NutritionOrder.enteralFormula.administration.rate[x]" + }, + "modifierExtension": { name: "modifierExtension", dataType: r4:Extension, @@ -353,15 +371,7 @@ public type PASNutritionOrder record {| description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", path: "NutritionOrder.enteralFormula.administration.modifierExtension" }, - "rateNutritionOrderRatio": { - name: "rateNutritionOrderRatio", - dataType: r4:Ratio, - min: 0, - max: 1, - isArray: false, - description: "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", - path: "NutritionOrder.enteralFormula.administration.rate[x]" - }, + "id": { name: "id", dataType: string, @@ -370,15 +380,6 @@ public type PASNutritionOrder record {| isArray: false, description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", path: "NutritionOrder.enteralFormula.administration.id" - }, - "rateNutritionOrderQuantity": { - name: "rateNutritionOrderQuantity", - dataType: r4:Quantity, - min: 0, - max: 1, - isArray: false, - description: "The rate of administration of formula via a feeding pump, e.g. 60 mL per hour, according to the specified schedule.", - path: "NutritionOrder.enteralFormula.administration.rate[x]" } }, serializers: { @@ -391,11 +392,11 @@ public type PASNutritionOrderEnteralFormulaAdministration record {| r4:Timing schedule?; r4:Extension[] extension?; + r4:Ratio rateRatio?; r4:Quantity quantity?; + r4:Quantity rateQuantity?; r4:Extension[] modifierExtension?; - r4:Ratio rateNutritionOrderRatio?; string id?; - r4:Quantity rateNutritionOrderQuantity?; |}; # FHIR PASNutritionOrderOralDietTexture datatype record. diff --git a/davincipas/resource_pasorganization.bal b/davincipas/resource_pasorganization.bal index dfaa507b..f5e6dc96 100644 --- a/davincipas/resource_pasorganization.bal +++ b/davincipas/resource_pasorganization.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,10 +13,12 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. + +import ballerina/constraint; import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASORGANIZATION = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-organization"; @@ -29,16 +31,24 @@ public const RESOURCE_NAME_PASORGANIZATION = "Organization"; # * identifier Slicings # 1) PASOrganizationIdentifierNPI: An identifier intended for computation # - min = 0 -# - max = 1 + # - max = * # -# 2) PASOrganizationIdentifierTIN: The US Employer Identification Number (EIN) or Tax Identification Number (TIN). + # 2) PASOrganizationIdentifierNAIC: An identifier intended for computation + # - min = 0 + # - max = * + # + # 3) PASOrganizationIdentifierTIN: The US Employer Identification Number (EIN) or Tax Identification Number (TIN). # - min = 0 # - max = 1 # -# 3) PASOrganizationIdentifierCLIA: An identifier intended for computation + # 4) PASOrganizationIdentifierPI: The Payer Identification Number (PI) # - min = 0 # - max = 1 # + # 5) PASOrganizationIdentifierCLIA: An identifier intended for computation + # - min = 0 + # - max = * + # # + partOf - The organization of which this organization forms a part. # + extension - May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + address - An address for the organization. @@ -239,6 +249,15 @@ public type PASOrganization record {| r4:Element ...; |}; +# PASOrganizationTelecomUse enum +public enum PASOrganizationTelecomUse { + CODE_USE_TEMP = "temp", + CODE_USE_WORK = "work", + CODE_USE_OLD = "old", + CODE_USE_MOBILE = "mobile", + CODE_USE_HOME = "home" +} + # PASOrganizationAddressUse enum public enum PASOrganizationAddressUse { CODE_USE_TEMP = "temp", @@ -248,6 +267,17 @@ public enum PASOrganizationAddressUse { CODE_USE_BILLING = "billing" } +# PASOrganizationTelecomSystem enum +public enum PASOrganizationTelecomSystem { + CODE_SYSTEM_OTHER = "other", + CODE_SYSTEM_PAGER = "pager", + CODE_SYSTEM_PHONE = "phone", + CODE_SYSTEM_SMS = "sms", + CODE_SYSTEM_FAX = "fax", + CODE_SYSTEM_EMAIL = "email", + CODE_SYSTEM_URL = "url" +} + # FHIR PASOrganizationContact datatype record. # # + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. @@ -370,100 +400,99 @@ public type PASOrganizationIdentifierNPI record {| r4:uri system = "http://hl7.org/fhir/sid/us-npi"; |}; -# PASOrganizationIdentifierUse enum -public enum PASOrganizationIdentifierUse { - CODE_USE_SECONDARY = "secondary", - CODE_USE_TEMP = "temp", - CODE_USE_USUAL = "usual", - CODE_USE_OLD = "old", - CODE_USE_OFFICIAL = "official" -} -# FHIR PASOrganizationIdentifierTIN datatype record. +# FHIR PASOrganizationIdentifierTypeCoding datatype record. # -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + period - Time period during which identifier is/was valid for use. -# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. -# + use - The purpose of this identifier. -# + assigner - Organization that issued/manages the identifier. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. -# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + @r4:DataTypeDefinition { - name: "PASOrganizationIdentifierTIN", + name: "PASOrganizationIdentifierTypeCoding", baseType: (), elements: { - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Organization.identifier.extension" - }, - "period": { - name: "period", - dataType: r4:Period, - min: 0, - max: 1, - isArray: false, - description: "Time period during which identifier is/was valid for use.", - path: "Organization.identifier.period" - }, "system": { name: "system", dataType: r4:uri, min: 1, max: 1, isArray: false, - description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", - path: "Organization.identifier.system" - }, - "use": { - name: "use", - dataType: PASOrganizationIdentifierUse, - min: 0, - max: 1, - isArray: false, - description: "The purpose of this identifier.", - path: "Organization.identifier.use" - }, - "assigner": { - name: "assigner", - dataType: r4:Reference, - min: 0, - max: 1, - isArray: false, - description: "Organization that issued/manages the identifier.", - path: "Organization.identifier.assigner" + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Organization.identifier.type.coding.system" }, - "id": { - name: "id", - dataType: string, - min: 0, + + "code": { + name: "code", + dataType: r4:code, + min: 1, max: 1, isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Organization.identifier.id" + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Organization.identifier.type.coding.code" + } }, - "type": { - name: "type", - dataType: r4:CodeableConcept, - min: 0, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASOrganizationIdentifierTypeCoding record {| + *r4:Coding; + + r4:uri system = "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType"; + r4:code code = "payerid"; +|}; + + +# FHIR PASOrganizationIdentifierNAIC datatype record. +# +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. + +@r4:DataTypeDefinition { + name: "PASOrganizationIdentifierNAIC", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, max: 1, isArray: false, - description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", - path: "Organization.identifier.type" + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Organization.identifier.system" + } }, - "value": { - name: "value", - dataType: string, - min: 0, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASOrganizationIdentifierNAIC record {| + *r4:Identifier; + + r4:uri system = "urn:oid:2.16.840.1.113883.6.300"; +|}; + + +# FHIR PASOrganizationIdentifierTIN datatype record. +# +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. + +@r4:DataTypeDefinition { + name: "PASOrganizationIdentifierTIN", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, max: 1, isArray: false, - description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", - path: "Organization.identifier.value" + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Organization.identifier.system" } }, serializers: { @@ -474,16 +503,52 @@ public enum PASOrganizationIdentifierUse { public type PASOrganizationIdentifierTIN record {| *r4:Identifier; - r4:Extension[] extension?; - r4:Period period?; r4:uri system = "http://terminology.hl7.org/NamingSystem/USEIN"; - PASOrganizationIdentifierUse use?; - r4:Reference assigner?; - string id?; - r4:CodeableConcept 'type?; - string value?; |}; + +# FHIR PASOrganizationIdentifierType datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASOrganizationIdentifierType", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASOrganizationIdentifierTypeCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Organization.identifier.type.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASOrganizationIdentifierType record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Organization.identifier.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Organization.identifier.type.coding constraint. This field must be an array containing at most one item." + } + } + PASOrganizationIdentifierTypeCoding [] coding; +|}; + + # FHIR PASOrganizationIdentifierCLIA datatype record. # # + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. @@ -512,6 +577,39 @@ public type PASOrganizationIdentifierCLIA record {| r4:uri system = "urn:oid:2.16.840.1.113883.4.7"; |}; + +# FHIR PASOrganizationIdentifierPI datatype record. +# +# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. + +@r4:DataTypeDefinition { + name: "PASOrganizationIdentifierPI", + baseType: (), + elements: { + "type": { + name: "type", + dataType: PASOrganizationIdentifierType, + min: 1, + max: 1, + isArray: false, + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "Organization.identifier.type" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASOrganizationIdentifierPI record {| + *r4:Identifier; + + PASOrganizationIdentifierType 'type; +|}; + + # PASOrganizationAddressType enum public enum PASOrganizationAddressType { CODE_TYPE_POSTAL = "postal", diff --git a/davincipas/resource_paspractitioner.bal b/davincipas/resource_paspractitioner.bal index f69c0934..80963407 100644 --- a/davincipas/resource_paspractitioner.bal +++ b/davincipas/resource_paspractitioner.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -30,10 +30,10 @@ public const RESOURCE_NAME_PASPRACTITIONER = "Practitioner"; # * identifier Slicings # 1) PASPractitionerIdentifierNPI: An identifier intended for computation # - min = 0 -# - max = 1 + # - max = * # # + extension - May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + address - Address(es) of the practitioner that are not role specific (typically home address). Work addresses are not typically entered in this property as they are usually role dependent. +# + address - Address(es) of the practitioner # + gender - Administrative Gender - the gender that the person is considered to have for administration and record keeping purposes. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + active - Whether this practitioner's record is in active use. @@ -213,7 +213,10 @@ public type PASPractitioner record {| RESOURCE_NAME_PASPRACTITIONER resourceType = RESOURCE_NAME_PASPRACTITIONER; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Practitioner.identifier constraint. This field must be an array containing at least one item." + } } ProfileIdentifier[] identifier; r4:Extension[] extension?; @@ -228,7 +231,10 @@ public type PASPractitioner record {| r4:Resource[] contained?; r4:Meta meta?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Practitioner.name constraint. This field must be an array containing at least one item." + } } r4:HumanName[] name; r4:uri implicitRules?; @@ -247,6 +253,26 @@ public enum PASPractitionerGender { CODE_GENDER_UNKNOWN = "unknown" } +# PASPractitionerTelecomSystem enum +public enum PASPractitionerTelecomSystem { + CODE_SYSTEM_OTHER = "other", + CODE_SYSTEM_PAGER = "pager", + CODE_SYSTEM_PHONE = "phone", + CODE_SYSTEM_SMS = "sms", + CODE_SYSTEM_FAX = "fax", + CODE_SYSTEM_EMAIL = "email", + CODE_SYSTEM_URL = "url" +} + +# PASPractitionerTelecomUse enum +public enum PASPractitionerTelecomUse { + CODE_USE_TEMP = "temp", + CODE_USE_WORK = "work", + CODE_USE_OLD = "old", + CODE_USE_MOBILE = "mobile", + CODE_USE_HOME = "home" +} + # FHIR PASPractitionerIdentifierNPI datatype record. # # + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. @@ -369,6 +395,16 @@ public type PASPractitionerQualification record {| r4:Reference issuer?; |}; + +# PASPractitionerAddressUse enum +public enum PASPractitionerAddressUse { + CODE_USE_TEMP = "temp", + CODE_USE_WORK = "work", + CODE_USE_OLD = "old", + CODE_USE_HOME = "home", + CODE_USE_BILLING = "billing" +} + # PASPractitionerNameUse enum public enum PASPractitionerNameUse { CODE_USE_MAIDEN = "maiden", @@ -380,3 +416,10 @@ public enum PASPractitionerNameUse { CODE_USE_ANONYMOUS = "anonymous" } +# PASPractitionerAddressType enum +public enum PASPractitionerAddressType { + CODE_TYPE_POSTAL = "postal", + CODE_TYPE_PHYSICAL = "physical", + CODE_TYPE_BOTH = "both" +} + diff --git a/davincipas/resource_pasrequestor.bal b/davincipas/resource_pasrequestor.bal index 19a2c8fa..ecddc0d2 100644 --- a/davincipas/resource_pasrequestor.bal +++ b/davincipas/resource_pasrequestor.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,10 +13,12 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. + +import ballerina/constraint; import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASREQUESTOR = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-requestor"; @@ -29,16 +31,24 @@ public const RESOURCE_NAME_PASREQUESTOR = "Organization"; # * identifier Slicings # 1) PASRequestorIdentifierNPI: An identifier intended for computation # - min = 0 -# - max = 1 + # - max = * # -# 2) PASRequestorIdentifierTIN: The US Employer Identification Number (EIN) or Tax Identification Number (TIN). + # 2) PASRequestorIdentifierNAIC: An identifier intended for computation + # - min = 0 + # - max = * + # + # 3) PASRequestorIdentifierTIN: The US Employer Identification Number (EIN) or Tax Identification Number (TIN). # - min = 0 # - max = 1 # -# 3) PASRequestorIdentifierCLIA: An identifier intended for computation + # 4) PASRequestorIdentifierPI: The Payer Identification Number (PI) # - min = 0 # - max = 1 # + # 5) PASRequestorIdentifierCLIA: An identifier intended for computation + # - min = 0 + # - max = * + # # + partOf - The organization of which this organization forms a part. # + extension - May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. # + address - An address for the organization. @@ -239,38 +249,25 @@ public type PASRequestor record {| r4:Element ...; |}; +# PASRequestorTelecomSystem enum +public enum PASRequestorTelecomSystem { + CODE_SYSTEM_OTHER = "other", + CODE_SYSTEM_PAGER = "pager", + CODE_SYSTEM_PHONE = "phone", + CODE_SYSTEM_SMS = "sms", + CODE_SYSTEM_FAX = "fax", + CODE_SYSTEM_EMAIL = "email", + CODE_SYSTEM_URL = "url" +} + # FHIR PASRequestorIdentifierTIN datatype record. # -# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. -# + period - Time period during which identifier is/was valid for use. # + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. -# + use - The purpose of this identifier. -# + assigner - Organization that issued/manages the identifier. -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. -# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. + @r4:DataTypeDefinition { name: "PASRequestorIdentifierTIN", baseType: (), elements: { - "extension": { - name: "extension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", - path: "Organization.identifier.extension" - }, - "period": { - name: "period", - dataType: r4:Period, - min: 0, - max: 1, - isArray: false, - description: "Time period during which identifier is/was valid for use.", - path: "Organization.identifier.period" - }, "system": { name: "system", dataType: r4:uri, @@ -279,51 +276,6 @@ public type PASRequestor record {| isArray: false, description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", path: "Organization.identifier.system" - }, - "use": { - name: "use", - dataType: PASRequestorIdentifierUse, - min: 0, - max: 1, - isArray: false, - description: "The purpose of this identifier.", - path: "Organization.identifier.use" - }, - "assigner": { - name: "assigner", - dataType: r4:Reference, - min: 0, - max: 1, - isArray: false, - description: "Organization that issued/manages the identifier.", - path: "Organization.identifier.assigner" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Organization.identifier.id" - }, - "type": { - name: "type", - dataType: r4:CodeableConcept, - min: 0, - max: 1, - isArray: false, - description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", - path: "Organization.identifier.type" - }, - "value": { - name: "value", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", - path: "Organization.identifier.value" } }, serializers: { @@ -334,14 +286,7 @@ public type PASRequestor record {| public type PASRequestorIdentifierTIN record {| *r4:Identifier; - r4:Extension[] extension?; - r4:Period period?; r4:uri system = "http://terminology.hl7.org/NamingSystem/USEIN"; - PASRequestorIdentifierUse use?; - r4:Reference assigner?; - string id?; - r4:CodeableConcept 'type?; - string value?; |}; # PASRequestorAddressType enum @@ -351,6 +296,38 @@ public enum PASRequestorAddressType { CODE_TYPE_BOTH = "both" } +# FHIR PASRequestorIdentifierPI datatype record. +# +# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. + +@r4:DataTypeDefinition { + name: "PASRequestorIdentifierPI", + baseType: (), + elements: { + "type": { + name: "type", + dataType: PASRequestorIdentifierType, + min: 1, + max: 1, + isArray: false, + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "Organization.identifier.type" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASRequestorIdentifierPI record {| + *r4:Identifier; + + PASRequestorIdentifierType 'type; +|}; + + # PASRequestorAddressUse enum public enum PASRequestorAddressUse { CODE_USE_TEMP = "temp", @@ -454,6 +431,60 @@ public type PASRequestorContact record {| string id?; |}; + +# FHIR PASRequestorIdentifierTypeCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASRequestorIdentifierTypeCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Organization.identifier.type.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Organization.identifier.type.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASRequestorIdentifierTypeCoding record {| + *r4:Coding; + + r4:uri system = "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType"; + r4:code code = "payerid"; +|}; + + +# PASRequestorTelecomUse enum +public enum PASRequestorTelecomUse { + CODE_USE_TEMP = "temp", + CODE_USE_WORK = "work", + CODE_USE_OLD = "old", + CODE_USE_MOBILE = "mobile", + CODE_USE_HOME = "home" +} + # FHIR PASRequestorIdentifierNPI datatype record. # # + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. @@ -482,15 +513,49 @@ public type PASRequestorIdentifierNPI record {| r4:uri system = "http://hl7.org/fhir/sid/us-npi"; |}; -# PASRequestorIdentifierUse enum -public enum PASRequestorIdentifierUse { - CODE_USE_SECONDARY = "secondary", - CODE_USE_TEMP = "temp", - CODE_USE_USUAL = "usual", - CODE_USE_OLD = "old", - CODE_USE_OFFICIAL = "official" + +# FHIR PASRequestorIdentifierType datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASRequestorIdentifierType", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASRequestorIdentifierTypeCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Organization.identifier.type.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } } +public type PASRequestorIdentifierType record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Organization.identifier.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Organization.identifier.type.coding constraint. This field must be an array containing at most one item." + } + } + PASRequestorIdentifierTypeCoding [] coding; +|}; + + # FHIR PASRequestorIdentifierCLIA datatype record. # # + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. @@ -519,3 +584,36 @@ public type PASRequestorIdentifierCLIA record {| r4:uri system = "urn:oid:2.16.840.1.113883.4.7"; |}; + +# FHIR PASRequestorIdentifierNAIC datatype record. +# +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. + +@r4:DataTypeDefinition { + name: "PASRequestorIdentifierNAIC", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Organization.identifier.system" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASRequestorIdentifierNAIC record {| + *r4:Identifier; + + r4:uri system = "urn:oid:2.16.840.1.113883.6.300"; +|}; + + diff --git a/davincipas/resource_passervice_request.bal b/davincipas/resource_passervice_request.bal index a34f9792..59976253 100644 --- a/davincipas/resource_passervice_request.bal +++ b/davincipas/resource_passervice_request.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -28,15 +28,6 @@ public const RESOURCE_NAME_PASSERVICEREQUEST = "ServiceRequest"; # + insurance - Insurance plans, coverage extensions, pre-authorizations and/or pre-determinations that may be needed for delivering the requested service. # + note - Any other notes and comments made about the service request. For example, internal billing notes. # + extension - An Extension -# * extension Slicings -# 1) Extension: Extension -# - min = 0 -# - max = 1 -# -# 2) Extension: CoverageInfo -# - min = 0 -# - max = 1 -# # + code - A code that identifies a particular service (i.e., procedure, diagnostic investigation, or panel of investigations) that have been requested. # + requisition - A shared identifier common to all service requests that were authorized more or less simultaneously by a single author, representing the composite or group identifier. # + subject - On whom or what the service is to be performed. This is usually a human patient, but can also be requested on animals, groups of humans or animals, devices such as dialysis machines, or even locations (typically for environmental scans). @@ -47,7 +38,7 @@ public const RESOURCE_NAME_PASSERVICEREQUEST = "ServiceRequest"; # + relevantHistory - Key events in the history of the request. # + supportingInfo - Additional clinical information about the patient or specimen that may influence the services or their interpretations. This information includes diagnosis, clinical findings and other observations. In laboratory ordering these are typically referred to as 'ask at order entry questions (AOEs)'. This includes observations explicitly requested by the producer (filler) to provide context or supporting information needed to complete the order. For example, reporting the amount of inspired oxygen for blood gas measurements. # + specimen - One or more specimens that the laboratory procedure will use. -# + quantityQuantity - An amount of service being requested which can be a quantity ( for example $1,500 home modification), a ratio ( for example, 20 half day visits per month), or a range (2.0 to 1.8 Gy per fraction). +# + quantityQuantity - The comparator is not used on a SimpleQuantity # + asNeededBoolean - If a CodeableConcept is present, it indicates the pre-condition for performing the service. For example 'pain', 'on flare-up', etc. # + id - The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. # + locationReference - A reference to the the preferred location(s) where the procedure should actually happen. E.g. at home or nursing day care center. @@ -454,7 +445,7 @@ public type PASServiceRequest record {| r4:Reference[] relevantHistory?; r4:Reference[] supportingInfo?; r4:Reference[] specimen?; - r4:Quantity quantityQuantity?; + ProfileQuantity quantityQuantity?; boolean asNeededBoolean?; string id?; r4:Reference[] locationReference?; diff --git a/davincipas/resource_passubscriber.bal b/davincipas/resource_passubscriber.bal index 0e8baf94..012113ba 100644 --- a/davincipas/resource_passubscriber.bal +++ b/davincipas/resource_passubscriber.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -23,27 +23,12 @@ import ballerinax/health.fhir.r4; public const string PROFILE_BASE_PASSUBSCRIBER = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-subscriber"; public const RESOURCE_NAME_PASSUBSCRIBER = "Patient"; +public type PASSubscriberExtensions (r4:Extension | ExtensionMilitaryStatus ); + # FHIR PASSubscriber resource record. # # + resourceType - The type of the resource describes # + extension - An Extension -# * extension Slicings -# 1) Extension: US Core ethnicity Extension -# - min = 0 -# - max = 1 -# -# 2) Extension: US Core Race Extension -# - min = 0 -# - max = 1 -# -# 3) Extension: Extension -# - min = 0 -# - max = 1 -# -# 4) Extension: Extension -# - min = 0 -# - max = 1 -# # + gender - Administrative Gender - the gender that the patient is considered to have for administration and record keeping purposes. # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + link - Link to another patient resource that concerns the same actual patient. @@ -56,6 +41,11 @@ public const RESOURCE_NAME_PASSUBSCRIBER = "Patient"; # + text - A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. # + communication - A language which may be used to communicate with the patient about his or her health. # + identifier - An identifier for this patient. + # * identifier Slicings + # 1) PASSubscriberIdentifierMemberIdentifier: An identifier for this patient + # - min = 1 + # - max = 1 + # # + address - An address for the individual. # + multipleBirthBoolean - Indicates whether the patient is part of a multiple (boolean) or indicates the actual birth order (integer). # + active - Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death. @@ -174,7 +164,7 @@ public const RESOURCE_NAME_PASSUBSCRIBER = "Patient"; }, "identifier" : { name: "identifier", - dataType: r4:Identifier, + dataType: PASSubscriberIdentifier, min: 1, max: int:MAX_VALUE, isArray: true, @@ -309,9 +299,12 @@ public type PASSubscriber record {| r4:Narrative text?; PASSubscriberCommunication[] communication?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Patient.identifier constraint. This field must be an array containing at least one item." + } } - r4:Identifier[] identifier; + PASSubscriberIdentifier [] identifier; PASSubscriberAddress[] address?; boolean multipleBirthBoolean?; boolean active?; @@ -323,7 +316,10 @@ public type PASSubscriber record {| r4:Meta meta?; r4:integer multipleBirthInteger?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Patient.name constraint. This field must be an array containing at least one item." + } } PASSubscriberName[] name; r4:uri implicitRules?; @@ -342,6 +338,238 @@ public enum PASSubscriberNameUse { CODE_USE_ANONYMOUS = "anonymous" } +# FHIR PASSubscriberIdentifierMemberIdentifier datatype record. +# +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + period - Time period during which identifier is/was valid for use. +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. +# + use - The purpose of this identifier. +# + assigner - Organization that issued/manages the identifier. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. +# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. + +@r4:DataTypeDefinition { + name: "PASSubscriberIdentifierMemberIdentifier", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Patient.identifier.extension" + }, + + "period": { + name: "period", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "Time period during which identifier is/was valid for use.", + path: "Patient.identifier.period" + }, + + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Patient.identifier.system" + }, + + "use": { + name: "use", + dataType: PASSubscriberIdentifierUseOne, + min: 0, + max: 1, + isArray: false, + description: "The purpose of this identifier.", + path: "Patient.identifier.use" + }, + + "assigner": { + name: "assigner", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "Organization that issued/manages the identifier.", + path: "Patient.identifier.assigner" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Patient.identifier.id" + }, + + "type": { + name: "type", + dataType: PASSubscriberIdentifierType, + min: 1, + max: 1, + isArray: false, + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "Patient.identifier.type" + }, + + "value": { + name: "value", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", + path: "Patient.identifier.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASSubscriberIdentifierMemberIdentifier record {| + *PASSubscriberIdentifier; + + r4:Extension [] extension?; + r4:Period period?; + r4:uri system; + PASSubscriberIdentifierUseOne use?; + r4:Reference assigner?; + string id?; + PASSubscriberIdentifierType 'type; + string value; +|}; + + +# FHIR PASSubscriberIdentifier datatype record. +# +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + period - Time period during which identifier is/was valid for use. +# + system - Establishes the namespace for the value - that is, a URL that describes a set values that are unique. +# + use - The purpose of this identifier. +# + assigner - Organization that issued/manages the identifier. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - A coded type for the identifier that can be used to determine which identifier to use for a specific purpose. +# + value - The portion of the identifier typically relevant to the user and which is unique within the context of the system. + +@r4:DataTypeDefinition { + name: "PASSubscriberIdentifier", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Patient.identifier.extension" + }, + + "period": { + name: "period", + dataType: r4:Period, + min: 0, + max: 1, + isArray: false, + description: "Time period during which identifier is/was valid for use.", + path: "Patient.identifier.period" + }, + + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.", + path: "Patient.identifier.system" + }, + + "use": { + name: "use", + dataType: PASSubscriberIdentifierUse, + min: 0, + max: 1, + isArray: false, + description: "The purpose of this identifier.", + path: "Patient.identifier.use" + }, + + "assigner": { + name: "assigner", + dataType: r4:Reference, + min: 0, + max: 1, + isArray: false, + description: "Organization that issued/manages the identifier.", + path: "Patient.identifier.assigner" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Patient.identifier.id" + }, + + "type": { + name: "type", + dataType: r4:CodeableConcept, + min: 0, + max: 1, + isArray: false, + description: "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.", + path: "Patient.identifier.type" + }, + + "value": { + name: "value", + dataType: string, + min: 1, + max: 1, + isArray: false, + description: "The portion of the identifier typically relevant to the user and which is unique within the context of the system.", + path: "Patient.identifier.value" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASSubscriberIdentifier record {| + *r4:Identifier; + + r4:Extension [] extension?; + r4:Period period?; + r4:uri system; + PASSubscriberIdentifierUse use?; + r4:Reference assigner?; + string id?; + r4:CodeableConcept 'type?; + string value; +|}; + + # PASSubscriberLinkType enum public enum PASSubscriberLinkType { CODE_TYPE_REFER = "refer", @@ -588,6 +816,49 @@ public type PASSubscriberAddress record {| PASSubscriberAddressType 'type?; |}; + +# FHIR PASSubscriberIdentifierType datatype record. +# +# + coding - A reference to a code defined by a terminology system. + +@r4:DataTypeDefinition { + name: "PASSubscriberIdentifierType", + baseType: (), + elements: { + "coding": { + name: "coding", + dataType: PASSubscriberIdentifierTypeCoding, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "A reference to a code defined by a terminology system.", + path: "Patient.identifier.type.coding" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASSubscriberIdentifierType record {| + *r4:CodeableConcept; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Patient.identifier.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Patient.identifier.type.coding constraint. This field must be an array containing at most one item." + } + } + PASSubscriberIdentifierTypeCoding [] coding; +|}; + + # PASSubscriberAddressType enum public enum PASSubscriberAddressType { CODE_TYPE_POSTAL = "postal", @@ -794,6 +1065,16 @@ public type PASSubscriberCommunication record {| boolean preferred?; |}; + +# PASSubscriberIdentifierUseOne enum +public enum PASSubscriberIdentifierUseOne { + CODE_USE_SECONDARY = "secondary", + CODE_USE_TEMP = "temp", + CODE_USE_USUAL = "usual", + CODE_USE_OLD = "old", + CODE_USE_OFFICIAL = "official" +} + # PASSubscriberTelecomUse enum public enum PASSubscriberTelecomUse { CODE_USE_TEMP = "temp", @@ -930,6 +1211,50 @@ public enum PASSubscriberTelecomSystem { CODE_SYSTEM_URL = "url" } +# FHIR PASSubscriberIdentifierTypeCoding datatype record. +# +# + system - The identification of the code system that defines the meaning of the symbol in the code. +# + code - A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination). + +@r4:DataTypeDefinition { + name: "PASSubscriberIdentifierTypeCoding", + baseType: (), + elements: { + "system": { + name: "system", + dataType: r4:uri, + min: 1, + max: 1, + isArray: false, + description: "The identification of the code system that defines the meaning of the symbol in the code.", + path: "Patient.identifier.type.coding.system" + }, + + "code": { + name: "code", + dataType: r4:code, + min: 1, + max: 1, + isArray: false, + description: "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).", + path: "Patient.identifier.type.coding.code" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASSubscriberIdentifierTypeCoding record {| + *r4:Coding; + + r4:uri system = "http://terminology.hl7.org/CodeSystem/v2-0203"; + r4:code code = "MB"; +|}; + + # PASSubscriberGender enum public enum PASSubscriberGender { CODE_GENDER_OTHER = "other", diff --git a/davincipas/resource_passubscription.bal b/davincipas/resource_passubscription.bal new file mode 100644 index 00000000..95931a6c --- /dev/null +++ b/davincipas/resource_passubscription.bal @@ -0,0 +1,346 @@ +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). + +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// +// AUTO-GENERATED FILE. +// This file is auto-generated by Ballerina. + + +import ballerinax/health.fhir.r4; + +public const string PROFILE_BASE_PASSUBSCRIPTION = "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-subscription"; +public const RESOURCE_NAME_PASSUBSCRIPTION = "Subscription"; + + +# FHIR PASSubscription resource record. +# +# + resourceType - The type of the resource describes +# + reason - A description of why this subscription is defined. +# + extension - May be used to represent additional information that is not part of the basic definition of the resource. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + criteria - The rules that the server should use to determine when to generate notifications for this subscription. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + channel - Details where to send notifications when resources are received that meet the criteria. +# + language - The base language in which the resource is written. +# + 'error - A record of the last error that occurred when the server processed a notification. +# + contained - These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope. +# + meta - The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource. +# + contact - Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting. +# + implicitRules - A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc. +# + end - The time for the server to turn the subscription off. +# + id - The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes. +# + text - A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it 'clinically safe' for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety. +# + status - The status of the subscription, which marks the server state for managing the subscription. + +@r4:ResourceDefinition { + resourceType: "Subscription", + baseType: r4:DomainResource, + profile: "http://hl7.org/fhir/us/davinci-pas/StructureDefinition/profile-subscription", + elements: { + "reason" : { + name: "reason", + dataType: string, + min: 1, + max: 1, + isArray: false, + path: "Subscription.reason" + }, + + "extension" : { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + path: "Subscription.extension" + }, + + "criteria" : { + name: "criteria", + dataType: string, + min: 1, + max: 1, + isArray: false, + path: "Subscription.criteria" + }, + + "modifierExtension" : { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + path: "Subscription.modifierExtension" + }, + + "channel" : { + name: "channel", + dataType: PASSubscriptionChannel, + min: 1, + max: 1, + isArray: false, + path: "Subscription.channel" + }, + + "language" : { + name: "language", + dataType: r4:code, + min: 0, + max: 1, + isArray: false, + path: "Subscription.language", + valueSet: "http://hl7.org/fhir/ValueSet/languages" + }, + + "error" : { + name: "error", + dataType: string, + min: 0, + max: 1, + isArray: false, + path: "Subscription.error" + }, + + "contained" : { + name: "contained", + dataType: r4:Resource, + min: 0, + max: int:MAX_VALUE, + isArray: true, + path: "Subscription.contained" + }, + + "meta" : { + name: "meta", + dataType: r4:Meta, + min: 0, + max: 1, + isArray: false, + path: "Subscription.meta" + }, + + "contact" : { + name: "contact", + dataType: r4:ContactPoint, + min: 0, + max: int:MAX_VALUE, + isArray: true, + path: "Subscription.contact" + }, + + "implicitRules" : { + name: "implicitRules", + dataType: r4:uri, + min: 0, + max: 1, + isArray: false, + path: "Subscription.implicitRules" + }, + + "end" : { + name: "end", + dataType: r4:instant, + min: 0, + max: 1, + isArray: false, + path: "Subscription.end" + }, + + "id" : { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + path: "Subscription.id" + }, + + "text" : { + name: "text", + dataType: r4:Narrative, + min: 0, + max: 1, + isArray: false, + path: "Subscription.text" + }, + + "status" : { + name: "status", + dataType: PASSubscriptionStatus, + min: 1, + max: 1, + isArray: false, + path: "Subscription.status", + valueSet: "http://hl7.org/fhir/ValueSet/subscription-status|4.0.1" + } + + }, + + serializers: { + 'xml: r4:fhirResourceXMLSerializer, + 'json: r4:fhirResourceJsonSerializer + } +} + +public type PASSubscription record {| + *r4:DomainResource; + + RESOURCE_NAME_PASSUBSCRIPTION resourceType = RESOURCE_NAME_PASSUBSCRIPTION; + + string reason; + r4:Extension [] extension?; + string criteria; + r4:Extension [] modifierExtension?; + PASSubscriptionChannel channel; + r4:code language?; + string 'error?; + r4:Resource [] contained?; + r4:Meta meta?; + r4:ContactPoint [] contact?; + r4:uri implicitRules?; + r4:instant end?; + string id?; + r4:Narrative text?; + PASSubscriptionStatus status; + r4:Element ...; +|}; + +# FHIR PASSubscriptionChannel datatype record. +# +# + endpoint - The url that describes the actual end-point to send messages to. +# + extension - May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. +# + payload - The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type 'text/plain' may also be used for Email and SMS subscriptions. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + header - Additional headers / information to send as part of the notification. +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - The type of channel to send notifications on. + +@r4:DataTypeDefinition { + name: "PASSubscriptionChannel", + baseType: (), + elements: { + "endpoint": { + name: "endpoint", + dataType: r4:urlType, + min: 0, + max: 1, + isArray: false, + description: "The url that describes the actual end-point to send messages to.", + path: "Subscription.channel.endpoint" + }, + + "extension": { + name: "extension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", + path: "Subscription.channel.extension" + }, + + "payload": { + name: "payload", + dataType: PASSubscriptionChannelPayload, + min: 0, + max: 1, + isArray: false, + description: "The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type 'text/plain' may also be used for Email and SMS subscriptions.", + path: "Subscription.channel.payload" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Subscription.channel.modifierExtension" + }, + + "header": { + name: "header", + dataType: string, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "Additional headers / information to send as part of the notification.", + path: "Subscription.channel.header" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Subscription.channel.id" + }, + + "type": { + name: "type", + dataType: PASSubscriptionChannelType, + min: 1, + max: 1, + isArray: false, + description: "The type of channel to send notifications on.", + path: "Subscription.channel.type" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASSubscriptionChannel record {| + *r4:BackboneElement; + + r4:urlType endpoint?; + r4:Extension [] extension?; + PASSubscriptionChannelPayload payload?; + r4:Extension [] modifierExtension?; + string [] header?; + string id?; + PASSubscriptionChannelType 'type; +|}; + + +# PASSubscriptionChannelType enum +public enum PASSubscriptionChannelType { + CODE_TYPE_REST_HOOK = "rest-hook", + CODE_TYPE_WEBSOCKET = "websocket", + CODE_TYPE_SMS = "sms", + CODE_TYPE_MESSAGE = "message", + CODE_TYPE_EMAIL = "email" +} + +# PASSubscriptionChannelPayload enum +public enum PASSubscriptionChannelPayload { + CODE_PAYLOAD_EXTENSION = "extension", + CODE_PAYLOAD_ID = "id", + CODE_PAYLOAD_VALUE = "value" +} + +# PASSubscriptionStatus enum +public enum PASSubscriptionStatus { + CODE_STATUS_REQUESTED = "requested", + CODE_STATUS_ACTIVE = "active", + CODE_STATUS_ERROR = "error", + CODE_STATUS_OFF = "off" +} + diff --git a/davincipas/resource_pastask.bal b/davincipas/resource_pastask.bal index e90c9798..665d6e09 100644 --- a/davincipas/resource_pastask.bal +++ b/davincipas/resource_pastask.bal @@ -1,4 +1,4 @@ -// Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // WSO2 LLC. licenses this file to you under the Apache License, // Version 2.0 (the "License"); you may not use this file except @@ -13,7 +13,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. - +// // AUTO-GENERATED FILE. // This file is auto-generated by Ballerina. @@ -58,15 +58,15 @@ public const RESOURCE_NAME_PASTASK = "Task"; # + performerType - The kind of participant that should perform the task. # + input - Additional information that may be needed in the execution of the task. # * input Slicings -# 1) PASTaskInputQuestionnairesNeeded: Information used to perform task -# - min = 0 -# - max = * -# -# 2) PASTaskInputPayerURL: Information used to perform task + # 1) PASTaskInputPayerURL: Information used to perform task # - min = 1 # - max = 1 # -# 3) PASTaskInputAttachmentsNeeded: Information used to perform task + # 2) PASTaskInputAttachmentsNeeded: Information used to perform task + # - min = 0 + # - max = * + # + # 3) PASTaskInputQuestionnaireContext: Information used to perform task # - min = 0 # - max = * # @@ -248,7 +248,7 @@ public const RESOURCE_NAME_PASTASK = "Task"; "owner" : { name: "owner", dataType: PASTaskOwner, - min: 1, + min: 0, max: 1, isArray: false, path: "Task.owner" @@ -256,7 +256,7 @@ public const RESOURCE_NAME_PASTASK = "Task"; "requester" : { name: "requester", dataType: PASTaskRequester, - min: 1, + min: 0, max: 1, isArray: false, path: "Task.requester" @@ -432,10 +432,13 @@ public type PASTask record {| PASTaskReasonCode reasonCode; r4:Narrative text?; r4:Reference[] basedOn?; - PASTaskOwner owner; - PASTaskRequester requester; + PASTaskOwner owner?; + PASTaskRequester requester?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Task.identifier constraint. This field must be an array containing at least one item." + } } r4:Identifier[] identifier; r4:dateTime authoredOn?; @@ -446,7 +449,10 @@ public type PASTask record {| PASTaskIntent intent; r4:CodeableConcept[] performerType?; @constraint:Array { - minLength: 2 + minLength: { + value: 1, + message: "Validation failed for $.Task.input constraint. This field must be an array containing at least one item." + } } PASTaskInput[] input; r4:Resource[] contained?; @@ -579,7 +585,7 @@ public type PASTaskInputTypeCodingTwo record {| *r4:Coding; r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; - r4:code code = "attachments-needed"; + r4:code code = "questionnaire-context"; |}; # PASTaskPriority enum @@ -653,7 +659,7 @@ public enum PASTaskPriority { "valueTime": { name: "valueTime", dataType: r4:time, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -662,7 +668,7 @@ public enum PASTaskPriority { "valueTriggerDefinition": { name: "valueTriggerDefinition", dataType: r4:TriggerDefinition, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -671,7 +677,7 @@ public enum PASTaskPriority { "valueMoney": { name: "valueMoney", dataType: r4:Money, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -680,7 +686,7 @@ public enum PASTaskPriority { "valueSignature": { name: "valueSignature", dataType: r4:Signature, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -707,7 +713,7 @@ public enum PASTaskPriority { "valueUuid": { name: "valueUuid", dataType: r4:uuid, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -716,7 +722,7 @@ public enum PASTaskPriority { "valueRatio": { name: "valueRatio", dataType: r4:Ratio, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -725,7 +731,7 @@ public enum PASTaskPriority { "valueParameterDefinition": { name: "valueParameterDefinition", dataType: r4:ParameterDefinition, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -743,7 +749,7 @@ public enum PASTaskPriority { "valueInteger": { name: "valueInteger", dataType: r4:integer, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -752,7 +758,7 @@ public enum PASTaskPriority { "valueUnsignedInt": { name: "valueUnsignedInt", dataType: r4:unsignedInt, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -761,7 +767,7 @@ public enum PASTaskPriority { "valueQuantity": { name: "valueQuantity", dataType: r4:Quantity, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -770,7 +776,7 @@ public enum PASTaskPriority { "valueCanonical": { name: "valueCanonical", dataType: r4:canonical, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -779,7 +785,7 @@ public enum PASTaskPriority { "valueCount": { name: "valueCount", dataType: r4:Count, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -788,7 +794,7 @@ public enum PASTaskPriority { "valueId": { name: "valueId", dataType: r4:id, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -797,7 +803,7 @@ public enum PASTaskPriority { "valueCode": { name: "valueCode", dataType: r4:code, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -806,7 +812,7 @@ public enum PASTaskPriority { "valueAddress": { name: "valueAddress", dataType: r4:Address, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -815,7 +821,7 @@ public enum PASTaskPriority { "valueContactPoint": { name: "valueContactPoint", dataType: r4:ContactPoint, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -824,7 +830,7 @@ public enum PASTaskPriority { "valuePeriod": { name: "valuePeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -833,7 +839,7 @@ public enum PASTaskPriority { "valueSampledData": { name: "valueSampledData", dataType: r4:SampledData, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -842,7 +848,7 @@ public enum PASTaskPriority { "valueTiming": { name: "valueTiming", dataType: r4:Timing, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -851,7 +857,7 @@ public enum PASTaskPriority { "valueInstant": { name: "valueInstant", dataType: r4:instant, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -860,7 +866,7 @@ public enum PASTaskPriority { "valueAge": { name: "valueAge", dataType: r4:Age, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -869,7 +875,7 @@ public enum PASTaskPriority { "valueDosage": { name: "valueDosage", dataType: r4:Dosage, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -878,7 +884,7 @@ public enum PASTaskPriority { "valueBase64Binary": { name: "valueBase64Binary", dataType: r4:base64Binary, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -887,7 +893,7 @@ public enum PASTaskPriority { "valueBoolean": { name: "valueBoolean", dataType: boolean, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -896,7 +902,7 @@ public enum PASTaskPriority { "valueCoding": { name: "valueCoding", dataType: r4:Coding, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -914,7 +920,7 @@ public enum PASTaskPriority { "valueIdentifier": { name: "valueIdentifier", dataType: r4:Identifier, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -923,7 +929,7 @@ public enum PASTaskPriority { "valueExpression": { name: "valueExpression", dataType: r4:Expression, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -932,7 +938,7 @@ public enum PASTaskPriority { "valueReference": { name: "valueReference", dataType: r4:Reference, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -941,7 +947,7 @@ public enum PASTaskPriority { "valueRange": { name: "valueRange", dataType: r4:Range, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -950,7 +956,7 @@ public enum PASTaskPriority { "valueUri": { name: "valueUri", dataType: r4:uri, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -959,7 +965,7 @@ public enum PASTaskPriority { "valueDistance": { name: "valueDistance", dataType: r4:Distance, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -968,7 +974,7 @@ public enum PASTaskPriority { "valueUrl": { name: "valueUrl", dataType: r4:urlType, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -977,7 +983,7 @@ public enum PASTaskPriority { "valueContactDetail": { name: "valueContactDetail", dataType: r4:ContactDetail, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -986,7 +992,7 @@ public enum PASTaskPriority { "valueMeta": { name: "valueMeta", dataType: r4:Meta, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -995,7 +1001,7 @@ public enum PASTaskPriority { "valueCodeableConcept": { name: "valueCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1004,7 +1010,7 @@ public enum PASTaskPriority { "valueMarkdown": { name: "valueMarkdown", dataType: r4:markdown, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1013,7 +1019,7 @@ public enum PASTaskPriority { "valueAttachment": { name: "valueAttachment", dataType: r4:Attachment, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1022,7 +1028,7 @@ public enum PASTaskPriority { "valueUsageContext": { name: "valueUsageContext", dataType: r4:UsageContext, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1031,7 +1037,7 @@ public enum PASTaskPriority { "valueDateTime": { name: "valueDateTime", dataType: r4:dateTime, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1040,7 +1046,7 @@ public enum PASTaskPriority { "valueHumanName": { name: "valueHumanName", dataType: r4:HumanName, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1049,7 +1055,7 @@ public enum PASTaskPriority { "valueRelatedArtifact": { name: "valueRelatedArtifact", dataType: r4:RelatedArtifact, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1058,7 +1064,7 @@ public enum PASTaskPriority { "valueDecimal": { name: "valueDecimal", dataType: decimal, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1067,7 +1073,7 @@ public enum PASTaskPriority { "valueDate": { name: "valueDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1076,7 +1082,7 @@ public enum PASTaskPriority { "valueOid": { name: "valueOid", dataType: r4:oid, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1085,7 +1091,7 @@ public enum PASTaskPriority { "valueContributor": { name: "valueContributor", dataType: r4:Contributor, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1094,7 +1100,7 @@ public enum PASTaskPriority { "valueString": { name: "valueString", dataType: string, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1103,7 +1109,7 @@ public enum PASTaskPriority { "valuePositiveInt": { name: "valuePositiveInt", dataType: r4:positiveInt, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1112,7 +1118,7 @@ public enum PASTaskPriority { "valueDuration": { name: "valueDuration", dataType: r4:Duration, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1121,7 +1127,7 @@ public enum PASTaskPriority { "valueDataRequirement": { name: "valueDataRequirement", dataType: r4:DataRequirement, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1130,7 +1136,7 @@ public enum PASTaskPriority { "valueAnnotation": { name: "valueAnnotation", dataType: r4:Annotation, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1145,60 +1151,60 @@ public enum PASTaskPriority { public type PASTaskInput record {| *r4:BackboneElement; - r4:time valueTime; - r4:TriggerDefinition valueTriggerDefinition; - r4:Money valueMoney; - r4:Signature valueSignature; + r4:time valueTime?; + r4:TriggerDefinition valueTriggerDefinition?; + r4:Money valueMoney?; + r4:Signature valueSignature?; r4:Extension[] modifierExtension?; r4:CodeableConcept 'type; - r4:uuid valueUuid; - r4:Ratio valueRatio; - r4:ParameterDefinition valueParameterDefinition; + r4:uuid valueUuid?; + r4:Ratio valueRatio?; + r4:ParameterDefinition valueParameterDefinition?; string id?; - r4:integer valueInteger; - r4:unsignedInt valueUnsignedInt; - r4:Quantity valueQuantity; - r4:canonical valueCanonical; - r4:Count valueCount; - r4:id valueId; - r4:code valueCode; - r4:Address valueAddress; - r4:ContactPoint valueContactPoint; - r4:Period valuePeriod; - r4:SampledData valueSampledData; - r4:Timing valueTiming; - r4:instant valueInstant; - r4:Age valueAge; - r4:Dosage valueDosage; - r4:base64Binary valueBase64Binary; - boolean valueBoolean; - r4:Coding valueCoding; + r4:integer valueInteger?; + r4:unsignedInt valueUnsignedInt?; + r4:Quantity valueQuantity?; + r4:canonical valueCanonical?; + r4:Count valueCount?; + r4:id valueId?; + r4:code valueCode?; + r4:Address valueAddress?; + r4:ContactPoint valueContactPoint?; + r4:Period valuePeriod?; + r4:SampledData valueSampledData?; + r4:Timing valueTiming?; + r4:instant valueInstant?; + r4:Age valueAge?; + r4:Dosage valueDosage?; + r4:base64Binary valueBase64Binary?; + boolean valueBoolean?; + r4:Coding valueCoding?; r4:Extension[] extension?; - r4:Identifier valueIdentifier; - r4:Expression valueExpression; - r4:Reference valueReference; - r4:Range valueRange; - r4:uri valueUri; - r4:Distance valueDistance; - r4:urlType valueUrl; - r4:ContactDetail valueContactDetail; - r4:Meta valueMeta; - r4:CodeableConcept valueCodeableConcept; - r4:markdown valueMarkdown; - r4:Attachment valueAttachment; - r4:UsageContext valueUsageContext; - r4:dateTime valueDateTime; - r4:HumanName valueHumanName; - r4:RelatedArtifact valueRelatedArtifact; - decimal valueDecimal; - r4:date valueDate; - r4:oid valueOid; - r4:Contributor valueContributor; - string valueString; - r4:positiveInt valuePositiveInt; - r4:Duration valueDuration; - r4:DataRequirement valueDataRequirement; - r4:Annotation valueAnnotation; + r4:Identifier valueIdentifier?; + r4:Expression valueExpression?; + r4:Reference valueReference?; + r4:Range valueRange?; + r4:uri valueUri?; + r4:Distance valueDistance?; + r4:urlType valueUrl?; + r4:ContactDetail valueContactDetail?; + r4:Meta valueMeta?; + r4:CodeableConcept valueCodeableConcept?; + r4:markdown valueMarkdown?; + r4:Attachment valueAttachment?; + r4:UsageContext valueUsageContext?; + r4:dateTime valueDateTime?; + r4:HumanName valueHumanName?; + r4:RelatedArtifact valueRelatedArtifact?; + decimal valueDecimal?; + r4:date valueDate?; + r4:oid valueOid?; + r4:Contributor valueContributor?; + string valueString?; + r4:positiveInt valuePositiveInt?; + r4:Duration valueDuration?; + r4:DataRequirement valueDataRequirement?; + r4:Annotation valueAnnotation?; |}; # FHIR PASTaskInputPayerURL datatype record. @@ -1241,7 +1247,7 @@ public type PASTaskInput record {| }, "type": { name: "type", - dataType: PASTaskInputTypeOne, + dataType: PASTaskInputType, min: 1, max: 1, isArray: false, @@ -1251,7 +1257,7 @@ public type PASTaskInput record {| "valueUrl": { name: "valueUrl", dataType: r4:urlType, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1269,8 +1275,8 @@ public type PASTaskInputPayerURL record {| r4:Extension[] extension?; r4:Extension[] modifierExtension?; string id?; - PASTaskInputTypeOne 'type; - r4:urlType valueUrl; + PASTaskInputType 'type; + r4:urlType valueUrl?; |}; # FHIR PASTaskReasonCodeCoding datatype record. @@ -1395,6 +1401,97 @@ public type PASTaskRequester record {| r4:uri 'type?; |}; + +# FHIR PASTaskInputQuestionnaireContext datatype record. +# +# + extension - An Extension +# + valueString - The value of the input parameter as a basic type. +# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). +# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. +# + 'type - A code or description indicating how the input is intended to be used as part of the task execution. + +@r4:DataTypeDefinition { + name: "PASTaskInputQuestionnaireContext", + baseType: (), + elements: { + "extension": { + name: "extension", + dataType: r4:Extension, + min: 1, + max: int:MAX_VALUE, + isArray: true, + description: "An Extension", + path: "Task.input.extension" + }, + + "valueString": { + name: "valueString", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "The value of the input parameter as a basic type.", + path: "Task.input.value[x]" + }, + + "modifierExtension": { + name: "modifierExtension", + dataType: r4:Extension, + min: 0, + max: int:MAX_VALUE, + isArray: true, + description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", + path: "Task.input.modifierExtension" + }, + + "id": { + name: "id", + dataType: string, + min: 0, + max: 1, + isArray: false, + description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", + path: "Task.input.id" + }, + + "type": { + name: "type", + dataType: PASTaskInputTypeTwo, + min: 1, + max: 1, + isArray: false, + description: "A code or description indicating how the input is intended to be used as part of the task execution.", + path: "Task.input.type" + } + }, + + serializers: { + 'xml: r4:complexDataTypeXMLSerializer, + 'json: r4:complexDataTypeJsonSerializer + } +} + +public type PASTaskInputQuestionnaireContext record {| + *PASTaskInput; + + @constraint:Array { + minLength: { + value: 1, + message: "Validation failed for $.Task.input.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Task.input.extension constraint. This field must be an array containing at most one item." + } + } + r4:Extension [] extension; + string valueString?; + r4:Extension [] modifierExtension?; + string id?; + PASTaskInputTypeTwo 'type; +|}; + + # PASTaskIntent enum public enum PASTaskIntent { CODE_INTENT_PROPOSAL = "proposal", @@ -1434,7 +1531,14 @@ public type PASTaskInputTypeTwo record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Task.input.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Task.input.type.coding constraint. This field must be an array containing at most one item." + } } PASTaskInputTypeCodingTwo[] coding; |}; @@ -1548,7 +1652,14 @@ public type PASTaskReasonCode record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Task.reasonCode.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Task.reasonCode.coding constraint. This field must be an array containing at most one item." + } } PASTaskReasonCodeCoding[] coding; |}; @@ -1587,7 +1698,14 @@ public type PASTaskInputTypeOne record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Task.input.type.coding constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Task.input.type.coding constraint. This field must be an array containing at most one item." + } } PASTaskInputTypeCodingOne[] coding; |}; @@ -1599,7 +1717,7 @@ public type PASTaskInputTypeOne record {| # + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). # + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. # + 'type - A code or description indicating how the input is intended to be used as part of the task execution. -# + paLineNumber - A specific line number associated with the attachment request code or TRN. + @r4:DataTypeDefinition { name: "PASTaskInputAttachmentsNeeded", baseType: (), @@ -1607,7 +1725,7 @@ public type PASTaskInputTypeOne record {| "valueCodeableConcept": { name: "valueCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the input parameter as a basic type.", @@ -1642,21 +1760,12 @@ public type PASTaskInputTypeOne record {| }, "type": { name: "type", - dataType: PASTaskInputTypeTwo, + dataType: PASTaskInputTypeOne, min: 1, max: 1, isArray: false, description: "A code or description indicating how the input is intended to be used as part of the task execution.", path: "Task.input.type" - }, - "paLineNumber": { - name: "paLineNumber", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A specific line number associated with the attachment request code or TRN.", - path: "Task.input.extension" } }, serializers: { @@ -1667,19 +1776,21 @@ public type PASTaskInputTypeOne record {| public type PASTaskInputAttachmentsNeeded record {| *PASTaskInput; - r4:CodeableConcept valueCodeableConcept; + r4:CodeableConcept valueCodeableConcept?; @constraint:Array { - minLength: 1 + minLength: { + value: 1, + message: "Validation failed for $.Task.input.extension constraint. This field must be an array containing at least one item." + }, + maxLength: { + value: 1, + message: "Validation failed for $.Task.input.extension constraint. This field must be an array containing at most one item." + } } r4:Extension[] extension; r4:Extension[] modifierExtension?; string id?; - PASTaskInputTypeTwo 'type; - @constraint:Array { - minLength: 1, - maxLength: 1 - } - r4:Extension[] paLineNumber; + PASTaskInputTypeOne 'type; |}; # FHIR PASTaskOutput datatype record. @@ -1745,7 +1856,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueTime": { name: "valueTime", dataType: r4:time, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1754,7 +1865,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueTriggerDefinition": { name: "valueTriggerDefinition", dataType: r4:TriggerDefinition, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1763,7 +1874,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueMoney": { name: "valueMoney", dataType: r4:Money, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1772,7 +1883,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueSignature": { name: "valueSignature", dataType: r4:Signature, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1799,7 +1910,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueUuid": { name: "valueUuid", dataType: r4:uuid, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1808,7 +1919,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueRatio": { name: "valueRatio", dataType: r4:Ratio, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1817,7 +1928,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueParameterDefinition": { name: "valueParameterDefinition", dataType: r4:ParameterDefinition, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1835,7 +1946,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueInteger": { name: "valueInteger", dataType: r4:integer, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1844,7 +1955,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueUnsignedInt": { name: "valueUnsignedInt", dataType: r4:unsignedInt, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1853,7 +1964,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueQuantity": { name: "valueQuantity", dataType: r4:Quantity, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1862,7 +1973,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueCanonical": { name: "valueCanonical", dataType: r4:canonical, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1871,7 +1982,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueCount": { name: "valueCount", dataType: r4:Count, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1880,7 +1991,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueId": { name: "valueId", dataType: r4:id, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1889,7 +2000,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueCode": { name: "valueCode", dataType: r4:code, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1898,7 +2009,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueAddress": { name: "valueAddress", dataType: r4:Address, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1907,7 +2018,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueContactPoint": { name: "valueContactPoint", dataType: r4:ContactPoint, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1916,7 +2027,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valuePeriod": { name: "valuePeriod", dataType: r4:Period, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1925,7 +2036,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueSampledData": { name: "valueSampledData", dataType: r4:SampledData, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1934,7 +2045,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueTiming": { name: "valueTiming", dataType: r4:Timing, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1943,7 +2054,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueInstant": { name: "valueInstant", dataType: r4:instant, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1952,7 +2063,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueAge": { name: "valueAge", dataType: r4:Age, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1961,7 +2072,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueDosage": { name: "valueDosage", dataType: r4:Dosage, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1970,7 +2081,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueBase64Binary": { name: "valueBase64Binary", dataType: r4:base64Binary, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1979,7 +2090,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueBoolean": { name: "valueBoolean", dataType: boolean, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -1988,7 +2099,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueCoding": { name: "valueCoding", dataType: r4:Coding, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2006,7 +2117,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueIdentifier": { name: "valueIdentifier", dataType: r4:Identifier, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2015,7 +2126,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueExpression": { name: "valueExpression", dataType: r4:Expression, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2024,7 +2135,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueReference": { name: "valueReference", dataType: r4:Reference, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2033,7 +2144,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueRange": { name: "valueRange", dataType: r4:Range, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2042,7 +2153,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueUri": { name: "valueUri", dataType: r4:uri, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2051,7 +2162,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueDistance": { name: "valueDistance", dataType: r4:Distance, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2060,7 +2171,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueUrl": { name: "valueUrl", dataType: r4:urlType, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2069,7 +2180,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueContactDetail": { name: "valueContactDetail", dataType: r4:ContactDetail, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2078,7 +2189,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueMeta": { name: "valueMeta", dataType: r4:Meta, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2087,7 +2198,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueCodeableConcept": { name: "valueCodeableConcept", dataType: r4:CodeableConcept, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2096,7 +2207,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueMarkdown": { name: "valueMarkdown", dataType: r4:markdown, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2105,7 +2216,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueAttachment": { name: "valueAttachment", dataType: r4:Attachment, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2114,7 +2225,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueUsageContext": { name: "valueUsageContext", dataType: r4:UsageContext, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2123,7 +2234,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueDateTime": { name: "valueDateTime", dataType: r4:dateTime, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2132,7 +2243,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueHumanName": { name: "valueHumanName", dataType: r4:HumanName, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2141,7 +2252,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueRelatedArtifact": { name: "valueRelatedArtifact", dataType: r4:RelatedArtifact, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2150,7 +2261,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueDecimal": { name: "valueDecimal", dataType: decimal, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2159,7 +2270,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueDate": { name: "valueDate", dataType: r4:date, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2168,7 +2279,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueOid": { name: "valueOid", dataType: r4:oid, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2177,7 +2288,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueContributor": { name: "valueContributor", dataType: r4:Contributor, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2186,7 +2297,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueString": { name: "valueString", dataType: string, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2195,7 +2306,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valuePositiveInt": { name: "valuePositiveInt", dataType: r4:positiveInt, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2204,7 +2315,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueDuration": { name: "valueDuration", dataType: r4:Duration, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2213,7 +2324,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueDataRequirement": { name: "valueDataRequirement", dataType: r4:DataRequirement, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2222,7 +2333,7 @@ public type PASTaskInputAttachmentsNeeded record {| "valueAnnotation": { name: "valueAnnotation", dataType: r4:Annotation, - min: 1, + min: 0, max: 1, isArray: false, description: "The value of the Output parameter as a basic type.", @@ -2237,60 +2348,60 @@ public type PASTaskInputAttachmentsNeeded record {| public type PASTaskOutput record {| *r4:BackboneElement; - r4:time valueTime; - r4:TriggerDefinition valueTriggerDefinition; - r4:Money valueMoney; - r4:Signature valueSignature; + r4:time valueTime?; + r4:TriggerDefinition valueTriggerDefinition?; + r4:Money valueMoney?; + r4:Signature valueSignature?; r4:Extension[] modifierExtension?; r4:CodeableConcept 'type; - r4:uuid valueUuid; - r4:Ratio valueRatio; - r4:ParameterDefinition valueParameterDefinition; + r4:uuid valueUuid?; + r4:Ratio valueRatio?; + r4:ParameterDefinition valueParameterDefinition?; string id?; - r4:integer valueInteger; - r4:unsignedInt valueUnsignedInt; - r4:Quantity valueQuantity; - r4:canonical valueCanonical; - r4:Count valueCount; - r4:id valueId; - r4:code valueCode; - r4:Address valueAddress; - r4:ContactPoint valueContactPoint; - r4:Period valuePeriod; - r4:SampledData valueSampledData; - r4:Timing valueTiming; - r4:instant valueInstant; - r4:Age valueAge; - r4:Dosage valueDosage; - r4:base64Binary valueBase64Binary; - boolean valueBoolean; - r4:Coding valueCoding; + r4:integer valueInteger?; + r4:unsignedInt valueUnsignedInt?; + r4:Quantity valueQuantity?; + r4:canonical valueCanonical?; + r4:Count valueCount?; + r4:id valueId?; + r4:code valueCode?; + r4:Address valueAddress?; + r4:ContactPoint valueContactPoint?; + r4:Period valuePeriod?; + r4:SampledData valueSampledData?; + r4:Timing valueTiming?; + r4:instant valueInstant?; + r4:Age valueAge?; + r4:Dosage valueDosage?; + r4:base64Binary valueBase64Binary?; + boolean valueBoolean?; + r4:Coding valueCoding?; r4:Extension[] extension?; - r4:Identifier valueIdentifier; - r4:Expression valueExpression; - r4:Reference valueReference; - r4:Range valueRange; - r4:uri valueUri; - r4:Distance valueDistance; - r4:urlType valueUrl; - r4:ContactDetail valueContactDetail; - r4:Meta valueMeta; - r4:CodeableConcept valueCodeableConcept; - r4:markdown valueMarkdown; - r4:Attachment valueAttachment; - r4:UsageContext valueUsageContext; - r4:dateTime valueDateTime; - r4:HumanName valueHumanName; - r4:RelatedArtifact valueRelatedArtifact; - decimal valueDecimal; - r4:date valueDate; - r4:oid valueOid; - r4:Contributor valueContributor; - string valueString; - r4:positiveInt valuePositiveInt; - r4:Duration valueDuration; - r4:DataRequirement valueDataRequirement; - r4:Annotation valueAnnotation; + r4:Identifier valueIdentifier?; + r4:Expression valueExpression?; + r4:Reference valueReference?; + r4:Range valueRange?; + r4:uri valueUri?; + r4:Distance valueDistance?; + r4:urlType valueUrl?; + r4:ContactDetail valueContactDetail?; + r4:Meta valueMeta?; + r4:CodeableConcept valueCodeableConcept?; + r4:markdown valueMarkdown?; + r4:Attachment valueAttachment?; + r4:UsageContext valueUsageContext?; + r4:dateTime valueDateTime?; + r4:HumanName valueHumanName?; + r4:RelatedArtifact valueRelatedArtifact?; + decimal valueDecimal?; + r4:date valueDate?; + r4:oid valueOid?; + r4:Contributor valueContributor?; + string valueString?; + r4:positiveInt valuePositiveInt?; + r4:Duration valueDuration?; + r4:DataRequirement valueDataRequirement?; + r4:Annotation valueAnnotation?; |}; # FHIR PASTaskInputTypeCodingOne datatype record. @@ -2329,7 +2440,7 @@ public type PASTaskInputTypeCodingOne record {| *r4:Coding; r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; - r4:code code = "payer-url"; + r4:code code = "attachments-needed"; |}; # FHIR PASTaskInputTypeCoding datatype record. @@ -2368,7 +2479,7 @@ public type PASTaskInputTypeCoding record {| *r4:Coding; r4:uri system = "http://hl7.org/fhir/us/davinci-pas/CodeSystem/PASTempCodes"; - r4:code code = "questionnaires-needed"; + r4:code code = "payer-url"; |}; # FHIR PASTaskInputType datatype record. @@ -2397,98 +2508,16 @@ public type PASTaskInputType record {| *r4:CodeableConcept; @constraint:Array { - minLength: 1 - } - PASTaskInputTypeCoding[] coding; -|}; - -# FHIR PASTaskInputQuestionnairesNeeded datatype record. -# -# + extension - An Extension -# + valueIdentifier - An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers. -# + modifierExtension - May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself). -# + id - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -# + 'type - A code or description indicating how the input is intended to be used as part of the task execution. -# + paLineNumber - A specific line number associated with the attachment request code or TRN. -@r4:DataTypeDefinition { - name: "PASTaskInputQuestionnairesNeeded", - baseType: (), - elements: { - "extension": { - name: "extension", - dataType: r4:Extension, - min: 1, - max: int:MAX_VALUE, - isArray: true, - description: "An Extension", - path: "Task.input.extension" - }, - "valueIdentifier": { - name: "valueIdentifier", - dataType: r4:Identifier, - min: 1, - max: 1, - isArray: false, - description: "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.", - path: "Task.input.value[x]" + minLength: { + value: 1, + message: "Validation failed for $.Task.input.type.coding constraint. This field must be an array containing at least one item." }, - "modifierExtension": { - name: "modifierExtension", - dataType: r4:Extension, - min: 0, - max: int:MAX_VALUE, - isArray: true, - description: "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions. Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).", - path: "Task.input.modifierExtension" - }, - "id": { - name: "id", - dataType: string, - min: 0, - max: 1, - isArray: false, - description: "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.", - path: "Task.input.id" - }, - "type": { - name: "type", - dataType: PASTaskInputType, - min: 1, - max: 1, - isArray: false, - description: "A code or description indicating how the input is intended to be used as part of the task execution.", - path: "Task.input.type" - }, - "paLineNumber": { - name: "paLineNumber", - dataType: r4:Extension, - min: 1, - max: 1, - isArray: true, - description: "A specific line number associated with the attachment request code or TRN.", - path: "Task.input.extension" + maxLength: { + value: 1, + message: "Validation failed for $.Task.input.type.coding constraint. This field must be an array containing at most one item." } - }, - serializers: { - 'xml: r4:complexDataTypeXMLSerializer, - 'json: r4:complexDataTypeJsonSerializer - } -} -public type PASTaskInputQuestionnairesNeeded record {| - *PASTaskInput; - - @constraint:Array { - minLength: 1 - } - r4:Extension[] extension; - r4:Identifier valueIdentifier; - r4:Extension[] modifierExtension?; - string id?; - PASTaskInputType 'type; - @constraint:Array { - minLength: 1, - maxLength: 1 } - r4:Extension[] paLineNumber; + PASTaskInputTypeCoding[] coding; |}; +