fhir_models 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +0 -1
  4. data/Gemfile.lock +1 -1
  5. data/Rakefile +0 -1
  6. data/fhir_models.gemspec +1 -1
  7. data/lib/fhir/metadata.rb +25 -0
  8. data/lib/fhir/resources/Account.rb +54 -0
  9. data/lib/fhir/resources/AllergyIntolerance.rb +92 -0
  10. data/lib/fhir/resources/Appointment.rb +88 -0
  11. data/lib/fhir/resources/AppointmentResponse.rb +48 -0
  12. data/lib/fhir/resources/AuditEvent.rb +188 -0
  13. data/lib/fhir/resources/Basic.rb +42 -0
  14. data/lib/fhir/resources/Binary.rb +28 -0
  15. data/lib/fhir/resources/BodySite.rb +44 -0
  16. data/lib/fhir/resources/Bundle.rb +154 -0
  17. data/lib/fhir/resources/CarePlan.rb +184 -0
  18. data/lib/fhir/resources/CareTeam.rb +70 -0
  19. data/lib/fhir/resources/Claim.rb +490 -0
  20. data/lib/fhir/resources/ClaimResponse.rb +421 -0
  21. data/lib/fhir/resources/ClinicalImpression.rb +131 -0
  22. data/lib/fhir/resources/CodeSystem.rb +225 -0
  23. data/lib/fhir/resources/Communication.rb +83 -0
  24. data/lib/fhir/resources/CommunicationRequest.rb +90 -0
  25. data/lib/fhir/resources/CompartmentDefinition.rb +98 -0
  26. data/lib/fhir/resources/Composition.rb +136 -0
  27. data/lib/fhir/resources/ConceptMap.rb +168 -0
  28. data/lib/fhir/resources/Condition.rb +126 -0
  29. data/lib/fhir/resources/Conformance.rb +442 -0
  30. data/lib/fhir/resources/Contract.rb +320 -0
  31. data/lib/fhir/resources/Coverage.rb +77 -0
  32. data/lib/fhir/resources/DataElement.rb +104 -0
  33. data/lib/fhir/resources/DecisionSupportRule.rb +42 -0
  34. data/lib/fhir/resources/DecisionSupportServiceModule.rb +40 -0
  35. data/lib/fhir/resources/DetectedIssue.rb +74 -0
  36. data/lib/fhir/resources/Device.rb +64 -0
  37. data/lib/fhir/resources/DeviceComponent.rb +74 -0
  38. data/lib/fhir/resources/DeviceMetric.rb +74 -0
  39. data/lib/fhir/resources/DeviceUseRequest.rb +68 -0
  40. data/lib/fhir/resources/DeviceUseStatement.rb +60 -0
  41. data/lib/fhir/resources/DiagnosticOrder.rb +106 -0
  42. data/lib/fhir/resources/DiagnosticReport.rb +91 -0
  43. data/lib/fhir/resources/DocumentManifest.rb +99 -0
  44. data/lib/fhir/resources/DocumentReference.rb +156 -0
  45. data/lib/fhir/resources/DomainResource.rb +32 -0
  46. data/lib/fhir/resources/EligibilityRequest.rb +90 -0
  47. data/lib/fhir/resources/EligibilityResponse.rb +152 -0
  48. data/lib/fhir/resources/Encounter.rb +172 -0
  49. data/lib/fhir/resources/EnrollmentRequest.rb +52 -0
  50. data/lib/fhir/resources/EnrollmentResponse.rb +52 -0
  51. data/lib/fhir/resources/EpisodeOfCare.rb +74 -0
  52. data/lib/fhir/resources/ExpansionProfile.rb +284 -0
  53. data/lib/fhir/resources/ExplanationOfBenefit.rb +764 -0
  54. data/lib/fhir/resources/FamilyMemberHistory.rb +110 -0
  55. data/lib/fhir/resources/Flag.rb +48 -0
  56. data/lib/fhir/resources/Goal.rb +91 -0
  57. data/lib/fhir/resources/Group.rb +105 -0
  58. data/lib/fhir/resources/GuidanceResponse.rb +139 -0
  59. data/lib/fhir/resources/HealthcareService.rb +122 -0
  60. data/lib/fhir/resources/ImagingExcerpt.rb +210 -0
  61. data/lib/fhir/resources/ImagingObjectSelection.rb +136 -0
  62. data/lib/fhir/resources/ImagingStudy.rb +130 -0
  63. data/lib/fhir/resources/Immunization.rb +148 -0
  64. data/lib/fhir/resources/ImmunizationRecommendation.rb +114 -0
  65. data/lib/fhir/resources/ImplementationGuide.rb +211 -0
  66. data/lib/fhir/resources/Library.rb +145 -0
  67. data/lib/fhir/resources/Linkage.rb +56 -0
  68. data/lib/fhir/resources/List.rb +82 -0
  69. data/lib/fhir/resources/Location.rb +78 -0
  70. data/lib/fhir/resources/Measure.rb +160 -0
  71. data/lib/fhir/resources/MeasureReport.rb +204 -0
  72. data/lib/fhir/resources/Media.rb +56 -0
  73. data/lib/fhir/resources/Medication.rb +154 -0
  74. data/lib/fhir/resources/MedicationAdministration.rb +104 -0
  75. data/lib/fhir/resources/MedicationDispense.rb +141 -0
  76. data/lib/fhir/resources/MedicationOrder.rb +172 -0
  77. data/lib/fhir/resources/MedicationStatement.rb +117 -0
  78. data/lib/fhir/resources/MessageHeader.rb +124 -0
  79. data/lib/fhir/resources/ModuleDefinition.rb +249 -0
  80. data/lib/fhir/resources/NamingSystem.rb +102 -0
  81. data/lib/fhir/resources/NutritionOrder.rb +211 -0
  82. data/lib/fhir/resources/Observation.rb +187 -0
  83. data/lib/fhir/resources/OperationDefinition.rb +153 -0
  84. data/lib/fhir/resources/OperationOutcome.rb +62 -0
  85. data/lib/fhir/resources/Order.rb +73 -0
  86. data/lib/fhir/resources/OrderResponse.rb +46 -0
  87. data/lib/fhir/resources/OrderSet.rb +38 -0
  88. data/lib/fhir/resources/Organization.rb +72 -0
  89. data/lib/fhir/resources/Parameters.rb +117 -0
  90. data/lib/fhir/resources/Patient.rb +166 -0
  91. data/lib/fhir/resources/PaymentNotice.rb +71 -0
  92. data/lib/fhir/resources/PaymentReconciliation.rb +140 -0
  93. data/lib/fhir/resources/Person.rb +72 -0
  94. data/lib/fhir/resources/Practitioner.rb +110 -0
  95. data/lib/fhir/resources/PractitionerRole.rb +102 -0
  96. data/lib/fhir/resources/Procedure.rb +122 -0
  97. data/lib/fhir/resources/ProcedureRequest.rb +73 -0
  98. data/lib/fhir/resources/ProcessRequest.rb +99 -0
  99. data/lib/fhir/resources/ProcessResponse.rb +92 -0
  100. data/lib/fhir/resources/Protocol.rb +242 -0
  101. data/lib/fhir/resources/Provenance.rb +122 -0
  102. data/lib/fhir/resources/Questionnaire.rb +205 -0
  103. data/lib/fhir/resources/QuestionnaireResponse.rb +123 -0
  104. data/lib/fhir/resources/ReferralRequest.rb +68 -0
  105. data/lib/fhir/resources/RelatedPerson.rb +52 -0
  106. data/lib/fhir/resources/Resource.rb +24 -0
  107. data/lib/fhir/resources/RiskAssessment.rb +88 -0
  108. data/lib/fhir/resources/Schedule.rb +46 -0
  109. data/lib/fhir/resources/SearchParameter.rb +86 -0
  110. data/lib/fhir/resources/Sequence.rb +238 -0
  111. data/lib/fhir/resources/Slot.rb +54 -0
  112. data/lib/fhir/resources/Specimen.rb +140 -0
  113. data/lib/fhir/resources/StructureDefinition.rb +164 -0
  114. data/lib/fhir/resources/StructureMap.rb +297 -0
  115. data/lib/fhir/resources/Subscription.rb +72 -0
  116. data/lib/fhir/resources/Substance.rb +86 -0
  117. data/lib/fhir/resources/SupplyDelivery.rb +54 -0
  118. data/lib/fhir/resources/SupplyRequest.rb +77 -0
  119. data/lib/fhir/resources/Task.rb +240 -0
  120. data/lib/fhir/resources/TestScript.rb +692 -0
  121. data/lib/fhir/resources/ValueSet.rb +289 -0
  122. data/lib/fhir/resources/VisionPrescription.rb +97 -0
  123. data/lib/fhir/types/ActionDefinition.rb +109 -0
  124. data/lib/fhir/types/Address.rb +36 -0
  125. data/lib/fhir/types/Annotation.rb +27 -0
  126. data/lib/fhir/types/Attachment.rb +32 -0
  127. data/lib/fhir/types/BackboneElement.rb +18 -0
  128. data/lib/fhir/types/CodeableConcept.rb +20 -0
  129. data/lib/fhir/types/Coding.rb +26 -0
  130. data/lib/fhir/types/ContactPoint.rb +26 -0
  131. data/lib/fhir/types/DataRequirement.rb +78 -0
  132. data/lib/fhir/types/Element.rb +16 -0
  133. data/lib/fhir/types/ElementDefinition.rb +605 -0
  134. data/lib/fhir/types/Extension.rb +87 -0
  135. data/lib/fhir/types/HumanName.rb +30 -0
  136. data/lib/fhir/types/Identifier.rb +28 -0
  137. data/lib/fhir/types/Meta.rb +26 -0
  138. data/lib/fhir/types/ModuleMetadata.rb +152 -0
  139. data/lib/fhir/types/Narrative.rb +20 -0
  140. data/lib/fhir/types/ParameterDefinition.rb +30 -0
  141. data/lib/fhir/types/Period.rb +20 -0
  142. data/lib/fhir/types/Quantity.rb +26 -0
  143. data/lib/fhir/types/Range.rb +20 -0
  144. data/lib/fhir/types/Ratio.rb +20 -0
  145. data/lib/fhir/types/Reference.rb +20 -0
  146. data/lib/fhir/types/SampledData.rb +30 -0
  147. data/lib/fhir/types/Signature.rb +31 -0
  148. data/lib/fhir/types/Timing.rb +69 -0
  149. data/lib/fhir/types/TriggerDefinition.rb +33 -0
  150. data/lib/fhir_models.rb +2 -2
  151. data/lib/tasks/tasks.rake +29 -0
  152. metadata +145 -2
@@ -0,0 +1,764 @@
1
+ module FHIR
2
+ class ExplanationOfBenefit < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ MULTIPLE_TYPES = {
8
+ 'claim' => ['Identifier', 'Reference'],
9
+ 'claimResponse' => ['Identifier', 'Reference'],
10
+ 'provider' => ['Identifier', 'Reference'],
11
+ 'organization' => ['Identifier', 'Reference'],
12
+ 'facility' => ['Identifier', 'Reference'],
13
+ 'prescription' => ['Identifier', 'Reference'],
14
+ 'originalPrescription' => ['Identifier', 'Reference'],
15
+ 'referral' => ['Identifier', 'Reference'],
16
+ 'patient' => ['Identifier', 'Reference'],
17
+ 'accidentLocation' => ['Address', 'Reference']
18
+ }
19
+ SEARCH_PARAMS = ["claimindentifier", "claimreference", "created", "disposition", "facilityidentifier", "facilityreference", "identifier", "organizationidentifier", "organizationreference", "patientidentifier", "patientreference", "provideridentifier", "providerreference"]
20
+ METADATA = {
21
+ 'id' => {'type'=>'id', 'path'=>'ExplanationOfBenefit.id', 'min'=>0, 'max'=>1},
22
+ 'meta' => {'type'=>'Meta', 'path'=>'ExplanationOfBenefit.meta', 'min'=>0, 'max'=>1},
23
+ 'implicitRules' => {'type'=>'uri', 'path'=>'ExplanationOfBenefit.implicitRules', 'min'=>0, 'max'=>1},
24
+ 'language' => {'type'=>'code', 'path'=>'ExplanationOfBenefit.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
25
+ 'text' => {'type'=>'Narrative', 'path'=>'ExplanationOfBenefit.text', 'min'=>0, 'max'=>1},
26
+ 'contained' => {'type'=>'Resource', 'path'=>'ExplanationOfBenefit.contained', 'min'=>0, 'max'=>Float::INFINITY},
27
+ 'extension' => {'type'=>'Extension', 'path'=>'ExplanationOfBenefit.extension', 'min'=>0, 'max'=>Float::INFINITY},
28
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'ExplanationOfBenefit.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
29
+ 'identifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.identifier', 'min'=>0, 'max'=>Float::INFINITY},
30
+ 'claimIdentifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.claim[x]', 'min'=>0, 'max'=>1},
31
+ 'claimReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Claim'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.claim[x]', 'min'=>0, 'max'=>1},
32
+ 'claimResponseIdentifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.claimResponse[x]', 'min'=>0, 'max'=>1},
33
+ 'claimResponseReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/ClaimResponse'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.claimResponse[x]', 'min'=>0, 'max'=>1},
34
+ 'subType' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimsubtype'=>['ortho', 'emergency']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.subType', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/claim-subtype'}},
35
+ 'ruleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.ruleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
36
+ 'originalRuleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.originalRuleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
37
+ 'created' => {'type'=>'dateTime', 'path'=>'ExplanationOfBenefit.created', 'min'=>0, 'max'=>1},
38
+ 'billablePeriod' => {'type'=>'Period', 'path'=>'ExplanationOfBenefit.billablePeriod', 'min'=>0, 'max'=>1},
39
+ 'disposition' => {'type'=>'string', 'path'=>'ExplanationOfBenefit.disposition', 'min'=>0, 'max'=>1},
40
+ 'providerIdentifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.provider[x]', 'min'=>0, 'max'=>1},
41
+ 'providerReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.provider[x]', 'min'=>0, 'max'=>1},
42
+ 'organizationIdentifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.organization[x]', 'min'=>0, 'max'=>1},
43
+ 'organizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.organization[x]', 'min'=>0, 'max'=>1},
44
+ 'facilityIdentifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.facility[x]', 'min'=>0, 'max'=>1},
45
+ 'facilityReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.facility[x]', 'min'=>0, 'max'=>1},
46
+ 'related' => {'type'=>'ExplanationOfBenefit::Related', 'path'=>'ExplanationOfBenefit.related', 'min'=>0, 'max'=>Float::INFINITY},
47
+ 'prescriptionIdentifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.prescription[x]', 'min'=>0, 'max'=>1},
48
+ 'prescriptionReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/MedicationOrder', 'http://hl7.org/fhir/StructureDefinition/VisionPrescription'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.prescription[x]', 'min'=>0, 'max'=>1},
49
+ 'originalPrescriptionIdentifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.originalPrescription[x]', 'min'=>0, 'max'=>1},
50
+ 'originalPrescriptionReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/MedicationOrder'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.originalPrescription[x]', 'min'=>0, 'max'=>1},
51
+ 'payee' => {'type'=>'ExplanationOfBenefit::Payee', 'path'=>'ExplanationOfBenefit.payee', 'min'=>0, 'max'=>1},
52
+ 'referralIdentifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.referral[x]', 'min'=>0, 'max'=>1},
53
+ 'referralReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/ReferralRequest'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.referral[x]', 'min'=>0, 'max'=>1},
54
+ 'occurrenceCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimoccurrance'=>['1001', '1002']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.occurrenceCode', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/occurrence-codes'}},
55
+ 'occurenceSpanCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimoccurrancespan'=>['1001', '1002']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.occurenceSpanCode', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/occurrence-span-codes'}},
56
+ 'valueCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimvalue'=>['1001', '1002']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.valueCode', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/value-codes'}},
57
+ 'diagnosis' => {'type'=>'ExplanationOfBenefit::Diagnosis', 'path'=>'ExplanationOfBenefit.diagnosis', 'min'=>0, 'max'=>Float::INFINITY},
58
+ 'procedure' => {'type'=>'ExplanationOfBenefit::Procedure', 'path'=>'ExplanationOfBenefit.procedure', 'min'=>0, 'max'=>Float::INFINITY},
59
+ 'specialCondition' => {'valid_codes'=>{'http://hl7.org/fhir/fm-conditions'=>['123987']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.specialCondition', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/fm-conditions'}},
60
+ 'patientIdentifier' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.patient[x]', 'min'=>1, 'max'=>1},
61
+ 'patientReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.patient[x]', 'min'=>1, 'max'=>1},
62
+ 'precedence' => {'type'=>'positiveInt', 'path'=>'ExplanationOfBenefit.precedence', 'min'=>0, 'max'=>1},
63
+ 'coverage' => {'type'=>'ExplanationOfBenefit::Coverage', 'path'=>'ExplanationOfBenefit.coverage', 'min'=>1, 'max'=>1},
64
+ 'accidentDate' => {'type'=>'date', 'path'=>'ExplanationOfBenefit.accidentDate', 'min'=>0, 'max'=>1},
65
+ 'accidentType' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActCode'=>['MVA', 'SCHOOL', 'SPT', 'WPA']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.accidentType', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-ActIncidentCode'}},
66
+ 'accidentLocationAddress' => {'type'=>'Address', 'path'=>'ExplanationOfBenefit.accidentLocation[x]', 'min'=>0, 'max'=>1},
67
+ 'accidentLocationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'ExplanationOfBenefit.accidentLocation[x]', 'min'=>0, 'max'=>1},
68
+ 'interventionException' => {'valid_codes'=>{'http://hl7.org/fhir/intervention'=>['unknown', 'other']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.interventionException', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/intervention'}},
69
+ 'onset' => {'type'=>'ExplanationOfBenefit::Onset', 'path'=>'ExplanationOfBenefit.onset', 'min'=>0, 'max'=>Float::INFINITY},
70
+ 'employmentImpacted' => {'type'=>'Period', 'path'=>'ExplanationOfBenefit.employmentImpacted', 'min'=>0, 'max'=>1},
71
+ 'hospitalization' => {'type'=>'Period', 'path'=>'ExplanationOfBenefit.hospitalization', 'min'=>0, 'max'=>1},
72
+ 'item' => {'type'=>'ExplanationOfBenefit::Item', 'path'=>'ExplanationOfBenefit.item', 'min'=>0, 'max'=>Float::INFINITY},
73
+ 'addItem' => {'type'=>'ExplanationOfBenefit::Additem', 'path'=>'ExplanationOfBenefit.addItem', 'min'=>0, 'max'=>Float::INFINITY},
74
+ 'missingTeeth' => {'type'=>'ExplanationOfBenefit::Missingteeth', 'path'=>'ExplanationOfBenefit.missingTeeth', 'min'=>0, 'max'=>Float::INFINITY},
75
+ 'totalCost' => {'type'=>'Quantity', 'path'=>'ExplanationOfBenefit.totalCost', 'min'=>0, 'max'=>1},
76
+ 'unallocDeductable' => {'type'=>'Quantity', 'path'=>'ExplanationOfBenefit.unallocDeductable', 'min'=>0, 'max'=>1},
77
+ 'totalBenefit' => {'type'=>'Quantity', 'path'=>'ExplanationOfBenefit.totalBenefit', 'min'=>0, 'max'=>1},
78
+ 'paymentAdjustment' => {'type'=>'Quantity', 'path'=>'ExplanationOfBenefit.paymentAdjustment', 'min'=>0, 'max'=>1},
79
+ 'paymentAdjustmentReason' => {'valid_codes'=>{'http://hl7.org/fhir/payment-adjustment-reason'=>['a001', 'a002']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.paymentAdjustmentReason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/payment-adjustment-reason'}},
80
+ 'paymentDate' => {'type'=>'date', 'path'=>'ExplanationOfBenefit.paymentDate', 'min'=>0, 'max'=>1},
81
+ 'paymentAmount' => {'type'=>'Quantity', 'path'=>'ExplanationOfBenefit.paymentAmount', 'min'=>0, 'max'=>1},
82
+ 'paymentRef' => {'type'=>'Identifier', 'path'=>'ExplanationOfBenefit.paymentRef', 'min'=>0, 'max'=>1},
83
+ 'reserved' => {'valid_codes'=>{'http://hl7.org/fhir/fundsreserve'=>['patient', 'provider', 'none']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.reserved', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/fundsreserve'}},
84
+ 'form' => {'valid_codes'=>{'http://hl7.org/fhir/forms-codes'=>['1', '2']}, 'type'=>'Coding', 'path'=>'ExplanationOfBenefit.form', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/forms'}},
85
+ 'note' => {'type'=>'ExplanationOfBenefit::Note', 'path'=>'ExplanationOfBenefit.note', 'min'=>0, 'max'=>Float::INFINITY},
86
+ 'benefitBalance' => {'type'=>'ExplanationOfBenefit::Benefitbalance', 'path'=>'ExplanationOfBenefit.benefitBalance', 'min'=>0, 'max'=>Float::INFINITY}
87
+ }
88
+
89
+ class Related < FHIR::Model
90
+ include FHIR::Hashable
91
+ include FHIR::Json
92
+ include FHIR::Xml
93
+
94
+ MULTIPLE_TYPES = {
95
+ 'claim' => ['Identifier', 'Reference']
96
+ }
97
+ METADATA = {
98
+ 'id' => {'type'=>'id', 'path'=>'Related.id', 'min'=>0, 'max'=>1},
99
+ 'extension' => {'type'=>'Extension', 'path'=>'Related.extension', 'min'=>0, 'max'=>Float::INFINITY},
100
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Related.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
101
+ 'claimIdentifier' => {'type'=>'Identifier', 'path'=>'Related.claim[x]', 'min'=>0, 'max'=>1},
102
+ 'claimReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Claim'], 'type'=>'Reference', 'path'=>'Related.claim[x]', 'min'=>0, 'max'=>1},
103
+ 'relationship' => {'valid_codes'=>{'http://hl7.org/fhir/ex-relatedclaimrelationship'=>['prior', 'associated']}, 'type'=>'Coding', 'path'=>'Related.relationship', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/related-claim-relationship'}},
104
+ 'reference' => {'type'=>'Identifier', 'path'=>'Related.reference', 'min'=>0, 'max'=>1}
105
+ }
106
+
107
+ attr_accessor :id # 0-1 id
108
+ attr_accessor :extension # 0-* [ Extension ]
109
+ attr_accessor :modifierExtension # 0-* [ Extension ]
110
+ attr_accessor :claimIdentifier # 0-1 Identifier
111
+ attr_accessor :claimReference # 0-1 Reference(Claim)
112
+ attr_accessor :relationship # 0-1 Coding
113
+ attr_accessor :reference # 0-1 Identifier
114
+ end
115
+
116
+ class Payee < FHIR::Model
117
+ include FHIR::Hashable
118
+ include FHIR::Json
119
+ include FHIR::Xml
120
+
121
+ MULTIPLE_TYPES = {
122
+ 'party' => ['Identifier', 'Reference']
123
+ }
124
+ METADATA = {
125
+ 'id' => {'type'=>'id', 'path'=>'Payee.id', 'min'=>0, 'max'=>1},
126
+ 'extension' => {'type'=>'Extension', 'path'=>'Payee.extension', 'min'=>0, 'max'=>Float::INFINITY},
127
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Payee.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
128
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/payeetype'=>['subscriber', 'provider', 'other']}, 'type'=>'Coding', 'path'=>'Payee.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/payeetype'}},
129
+ 'partyIdentifier' => {'type'=>'Identifier', 'path'=>'Payee.party[x]', 'min'=>0, 'max'=>1},
130
+ 'partyReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson'], 'type'=>'Reference', 'path'=>'Payee.party[x]', 'min'=>0, 'max'=>1}
131
+ }
132
+
133
+ attr_accessor :id # 0-1 id
134
+ attr_accessor :extension # 0-* [ Extension ]
135
+ attr_accessor :modifierExtension # 0-* [ Extension ]
136
+ attr_accessor :type # 0-1 Coding
137
+ attr_accessor :partyIdentifier # 0-1 Identifier
138
+ attr_accessor :partyReference # 0-1 Reference(Practitioner|Organization|Patient|RelatedPerson)
139
+ end
140
+
141
+ class Diagnosis < FHIR::Model
142
+ include FHIR::Hashable
143
+ include FHIR::Json
144
+ include FHIR::Xml
145
+
146
+ METADATA = {
147
+ 'id' => {'type'=>'id', 'path'=>'Diagnosis.id', 'min'=>0, 'max'=>1},
148
+ 'extension' => {'type'=>'Extension', 'path'=>'Diagnosis.extension', 'min'=>0, 'max'=>Float::INFINITY},
149
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Diagnosis.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
150
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Diagnosis.sequence', 'min'=>1, 'max'=>1},
151
+ 'diagnosis' => {'type'=>'Coding', 'path'=>'Diagnosis.diagnosis', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/icd-10'}}
152
+ }
153
+
154
+ attr_accessor :id # 0-1 id
155
+ attr_accessor :extension # 0-* [ Extension ]
156
+ attr_accessor :modifierExtension # 0-* [ Extension ]
157
+ attr_accessor :sequence # 1-1 positiveInt
158
+ attr_accessor :diagnosis # 1-1 Coding
159
+ end
160
+
161
+ class Procedure < FHIR::Model
162
+ include FHIR::Hashable
163
+ include FHIR::Json
164
+ include FHIR::Xml
165
+
166
+ MULTIPLE_TYPES = {
167
+ 'procedure' => ['Coding', 'Reference']
168
+ }
169
+ METADATA = {
170
+ 'id' => {'type'=>'id', 'path'=>'Procedure.id', 'min'=>0, 'max'=>1},
171
+ 'extension' => {'type'=>'Extension', 'path'=>'Procedure.extension', 'min'=>0, 'max'=>Float::INFINITY},
172
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Procedure.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
173
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Procedure.sequence', 'min'=>1, 'max'=>1},
174
+ 'date' => {'type'=>'dateTime', 'path'=>'Procedure.date', 'min'=>0, 'max'=>1},
175
+ 'procedureCoding' => {'valid_codes'=>{'http://hl7.org/fhir/sid/ex-icd-10-procedures'=>['123001', '123002', '123003']}, 'type'=>'Coding', 'path'=>'Procedure.procedure[x]', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/icd-10-procedures'}},
176
+ 'procedureReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Procedure'], 'type'=>'Reference', 'path'=>'Procedure.procedure[x]', 'min'=>1, 'max'=>1}
177
+ }
178
+
179
+ attr_accessor :id # 0-1 id
180
+ attr_accessor :extension # 0-* [ Extension ]
181
+ attr_accessor :modifierExtension # 0-* [ Extension ]
182
+ attr_accessor :sequence # 1-1 positiveInt
183
+ attr_accessor :date # 0-1 dateTime
184
+ attr_accessor :procedureCoding # 1-1 Coding
185
+ attr_accessor :procedureReference # 1-1 Reference(Procedure)
186
+ end
187
+
188
+ class Coverage < FHIR::Model
189
+ include FHIR::Hashable
190
+ include FHIR::Json
191
+ include FHIR::Xml
192
+
193
+ MULTIPLE_TYPES = {
194
+ 'coverage' => ['Identifier', 'Reference']
195
+ }
196
+ METADATA = {
197
+ 'id' => {'type'=>'id', 'path'=>'Coverage.id', 'min'=>0, 'max'=>1},
198
+ 'extension' => {'type'=>'Extension', 'path'=>'Coverage.extension', 'min'=>0, 'max'=>Float::INFINITY},
199
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Coverage.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
200
+ 'coverageIdentifier' => {'type'=>'Identifier', 'path'=>'Coverage.coverage[x]', 'min'=>1, 'max'=>1},
201
+ 'coverageReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Coverage'], 'type'=>'Reference', 'path'=>'Coverage.coverage[x]', 'min'=>1, 'max'=>1},
202
+ 'preAuthRef' => {'type'=>'string', 'path'=>'Coverage.preAuthRef', 'min'=>0, 'max'=>Float::INFINITY}
203
+ }
204
+
205
+ attr_accessor :id # 0-1 id
206
+ attr_accessor :extension # 0-* [ Extension ]
207
+ attr_accessor :modifierExtension # 0-* [ Extension ]
208
+ attr_accessor :coverageIdentifier # 1-1 Identifier
209
+ attr_accessor :coverageReference # 1-1 Reference(Coverage)
210
+ attr_accessor :preAuthRef # 0-* [ string ]
211
+ end
212
+
213
+ class Onset < FHIR::Model
214
+ include FHIR::Hashable
215
+ include FHIR::Json
216
+ include FHIR::Xml
217
+
218
+ MULTIPLE_TYPES = {
219
+ 'time' => ['date', 'Period']
220
+ }
221
+ METADATA = {
222
+ 'id' => {'type'=>'id', 'path'=>'Onset.id', 'min'=>0, 'max'=>1},
223
+ 'extension' => {'type'=>'Extension', 'path'=>'Onset.extension', 'min'=>0, 'max'=>Float::INFINITY},
224
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Onset.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
225
+ 'timeDate' => {'type'=>'date', 'path'=>'Onset.time[x]', 'min'=>0, 'max'=>1},
226
+ 'timePeriod' => {'type'=>'Period', 'path'=>'Onset.time[x]', 'min'=>0, 'max'=>1},
227
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/ex-onsettype'=>['LXM', 'SYM', 'LMN']}, 'type'=>'Coding', 'path'=>'Onset.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ex-onsettype'}}
228
+ }
229
+
230
+ attr_accessor :id # 0-1 id
231
+ attr_accessor :extension # 0-* [ Extension ]
232
+ attr_accessor :modifierExtension # 0-* [ Extension ]
233
+ attr_accessor :timeDate # 0-1 date
234
+ attr_accessor :timePeriod # 0-1 Period
235
+ attr_accessor :type # 0-1 Coding
236
+ end
237
+
238
+ class Item < FHIR::Model
239
+ include FHIR::Hashable
240
+ include FHIR::Json
241
+ include FHIR::Xml
242
+
243
+ MULTIPLE_TYPES = {
244
+ 'provider' => ['Identifier', 'Reference'],
245
+ 'supervisor' => ['Identifier', 'Reference'],
246
+ 'serviced' => ['date', 'Period']
247
+ }
248
+ METADATA = {
249
+ 'id' => {'type'=>'id', 'path'=>'Item.id', 'min'=>0, 'max'=>1},
250
+ 'extension' => {'type'=>'Extension', 'path'=>'Item.extension', 'min'=>0, 'max'=>Float::INFINITY},
251
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Item.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
252
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Item.sequence', 'min'=>1, 'max'=>1},
253
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActCode'=>['_ActInvoiceInterGroupCode', 'CPNDDRGING', 'CPNDINDING', 'CPNDSUPING', 'DRUGING', 'FRAMEING', 'LENSING', 'PRDING', '_ActInvoiceRootGroupCode', 'CPINV', 'CSINV', 'CSPINV', 'FININV', 'OHSINV', 'PAINV', 'RXCINV', 'RXDINV', 'SBFINV', 'VRXINV']}, 'type'=>'Coding', 'path'=>'Item.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode'}},
254
+ 'providerIdentifier' => {'type'=>'Identifier', 'path'=>'Item.provider[x]', 'min'=>0, 'max'=>1},
255
+ 'providerReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'Item.provider[x]', 'min'=>0, 'max'=>1},
256
+ 'supervisorIdentifier' => {'type'=>'Identifier', 'path'=>'Item.supervisor[x]', 'min'=>0, 'max'=>1},
257
+ 'supervisorReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'Item.supervisor[x]', 'min'=>0, 'max'=>1},
258
+ 'providerQualification' => {'valid_codes'=>{'http://hl7.org/fhir/ex-providerqualification'=>['311405', '604215', '604210']}, 'type'=>'Coding', 'path'=>'Item.providerQualification', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/provider-qualification'}},
259
+ 'diagnosisLinkId' => {'type'=>'positiveInt', 'path'=>'Item.diagnosisLinkId', 'min'=>0, 'max'=>Float::INFINITY},
260
+ 'service' => {'valid_codes'=>{'http://hl7.org/fhir/ex-USCLS'=>['1101', '1102', '1103', '1201', '1205', '2101', '2102', '2141', '2601', '11101', '11102', '11103', '11104', '21211', '21212', '27211', '99111', '99333', '99555']}, 'type'=>'Coding', 'path'=>'Item.service', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/service-uscls'}},
261
+ 'serviceModifier' => {'valid_codes'=>{'http://hl7.org/fhir/ex-servicemodifier'=>['SR', 'AH']}, 'type'=>'Coding', 'path'=>'Item.serviceModifier', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/service-modifiers'}},
262
+ 'modifier' => {'valid_codes'=>{'http://hl7.org/fhir/modifiers'=>['A', 'B', 'C', 'E', 'X']}, 'type'=>'Coding', 'path'=>'Item.modifier', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/claim-modifiers'}},
263
+ 'programCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-programcode'=>['AS', 'HD', 'AUSCR']}, 'type'=>'Coding', 'path'=>'Item.programCode', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ex-program-code'}},
264
+ 'servicedDate' => {'type'=>'date', 'path'=>'Item.serviced[x]', 'min'=>0, 'max'=>1},
265
+ 'servicedPeriod' => {'type'=>'Period', 'path'=>'Item.serviced[x]', 'min'=>0, 'max'=>1},
266
+ 'place' => {'valid_codes'=>{'http://hl7.org/fhir/ex-serviceplace'=>['emergency', 'clinic']}, 'type'=>'Coding', 'path'=>'Item.place', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/service-place'}},
267
+ 'quantity' => {'type'=>'Quantity', 'path'=>'Item.quantity', 'min'=>0, 'max'=>1},
268
+ 'unitPrice' => {'type'=>'Quantity', 'path'=>'Item.unitPrice', 'min'=>0, 'max'=>1},
269
+ 'factor' => {'type'=>'decimal', 'path'=>'Item.factor', 'min'=>0, 'max'=>1},
270
+ 'points' => {'type'=>'decimal', 'path'=>'Item.points', 'min'=>0, 'max'=>1},
271
+ 'net' => {'type'=>'Quantity', 'path'=>'Item.net', 'min'=>0, 'max'=>1},
272
+ 'udi' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'Item.udi', 'min'=>0, 'max'=>Float::INFINITY},
273
+ 'bodySite' => {'valid_codes'=>{'http://hl7.org/fhir/ex-tooth'=>['0', '1', '2', '3', '4', '5', '6', '7', '8', '11', '12', '13', '14', '15', '16', '17', '18', '21', '22', '23', '24', '25', '26', '27', '28', '31', '32', '33', '34', '35', '36', '37', '38', '41', '42', '43', '44', '45', '46', '47', '48']}, 'type'=>'Coding', 'path'=>'Item.bodySite', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/tooth'}},
274
+ 'subSite' => {'valid_codes'=>{'http://hl7.org/fhir/FDI-surface'=>['M', 'O', 'I', 'D', 'B', 'V', 'L', 'MO', 'DO', 'DI', 'MOD']}, 'type'=>'Coding', 'path'=>'Item.subSite', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/surface'}},
275
+ 'noteNumber' => {'type'=>'positiveInt', 'path'=>'Item.noteNumber', 'min'=>0, 'max'=>Float::INFINITY},
276
+ 'adjudication' => {'type'=>'ExplanationOfBenefit::Item::Adjudication', 'path'=>'Item.adjudication', 'min'=>0, 'max'=>Float::INFINITY},
277
+ 'detail' => {'type'=>'ExplanationOfBenefit::Item::Detail', 'path'=>'Item.detail', 'min'=>0, 'max'=>Float::INFINITY},
278
+ 'prosthesis' => {'type'=>'ExplanationOfBenefit::Item::Prosthesis', 'path'=>'Item.prosthesis', 'min'=>0, 'max'=>1}
279
+ }
280
+
281
+ class Adjudication < FHIR::Model
282
+ include FHIR::Hashable
283
+ include FHIR::Json
284
+ include FHIR::Xml
285
+
286
+ METADATA = {
287
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
288
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
289
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
290
+ 'category' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication'=>['total', 'copay', 'eligible', 'deductible', 'eligpercent', 'tax', 'benefit']}, 'type'=>'Coding', 'path'=>'Adjudication.category', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication'}},
291
+ 'reason' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication-reason'=>['ar001', 'ar002']}, 'type'=>'Coding', 'path'=>'Adjudication.reason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication-reason'}},
292
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
293
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
294
+ }
295
+
296
+ attr_accessor :id # 0-1 id
297
+ attr_accessor :extension # 0-* [ Extension ]
298
+ attr_accessor :modifierExtension # 0-* [ Extension ]
299
+ attr_accessor :category # 1-1 Coding
300
+ attr_accessor :reason # 0-1 Coding
301
+ attr_accessor :amount # 0-1 Quantity
302
+ attr_accessor :value # 0-1 decimal
303
+ end
304
+
305
+ class Detail < FHIR::Model
306
+ include FHIR::Hashable
307
+ include FHIR::Json
308
+ include FHIR::Xml
309
+
310
+ METADATA = {
311
+ 'id' => {'type'=>'id', 'path'=>'Detail.id', 'min'=>0, 'max'=>1},
312
+ 'extension' => {'type'=>'Extension', 'path'=>'Detail.extension', 'min'=>0, 'max'=>Float::INFINITY},
313
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Detail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
314
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Detail.sequence', 'min'=>1, 'max'=>1},
315
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActCode'=>['_ActInvoiceInterGroupCode', 'CPNDDRGING', 'CPNDINDING', 'CPNDSUPING', 'DRUGING', 'FRAMEING', 'LENSING', 'PRDING', '_ActInvoiceRootGroupCode', 'CPINV', 'CSINV', 'CSPINV', 'FININV', 'OHSINV', 'PAINV', 'RXCINV', 'RXDINV', 'SBFINV', 'VRXINV']}, 'type'=>'Coding', 'path'=>'Detail.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode'}},
316
+ 'service' => {'valid_codes'=>{'http://hl7.org/fhir/ex-USCLS'=>['1101', '1102', '1103', '1201', '1205', '2101', '2102', '2141', '2601', '11101', '11102', '11103', '11104', '21211', '21212', '27211', '99111', '99333', '99555']}, 'type'=>'Coding', 'path'=>'Detail.service', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/service-uscls'}},
317
+ 'programCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-programcode'=>['AS', 'HD', 'AUSCR']}, 'type'=>'Coding', 'path'=>'Detail.programCode', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ex-program-code'}},
318
+ 'quantity' => {'type'=>'Quantity', 'path'=>'Detail.quantity', 'min'=>0, 'max'=>1},
319
+ 'unitPrice' => {'type'=>'Quantity', 'path'=>'Detail.unitPrice', 'min'=>0, 'max'=>1},
320
+ 'factor' => {'type'=>'decimal', 'path'=>'Detail.factor', 'min'=>0, 'max'=>1},
321
+ 'points' => {'type'=>'decimal', 'path'=>'Detail.points', 'min'=>0, 'max'=>1},
322
+ 'net' => {'type'=>'Quantity', 'path'=>'Detail.net', 'min'=>0, 'max'=>1},
323
+ 'udi' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'Detail.udi', 'min'=>0, 'max'=>Float::INFINITY},
324
+ 'adjudication' => {'type'=>'ExplanationOfBenefit::Item::Detail::Adjudication', 'path'=>'Detail.adjudication', 'min'=>0, 'max'=>Float::INFINITY},
325
+ 'subDetail' => {'type'=>'ExplanationOfBenefit::Item::Detail::Subdetail', 'path'=>'Detail.subDetail', 'min'=>0, 'max'=>Float::INFINITY}
326
+ }
327
+
328
+ class Adjudication < FHIR::Model
329
+ include FHIR::Hashable
330
+ include FHIR::Json
331
+ include FHIR::Xml
332
+
333
+ METADATA = {
334
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
335
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
336
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
337
+ 'category' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication'=>['total', 'copay', 'eligible', 'deductible', 'eligpercent', 'tax', 'benefit']}, 'type'=>'Coding', 'path'=>'Adjudication.category', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication'}},
338
+ 'reason' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication-reason'=>['ar001', 'ar002']}, 'type'=>'Coding', 'path'=>'Adjudication.reason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication-reason'}},
339
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
340
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
341
+ }
342
+
343
+ attr_accessor :id # 0-1 id
344
+ attr_accessor :extension # 0-* [ Extension ]
345
+ attr_accessor :modifierExtension # 0-* [ Extension ]
346
+ attr_accessor :category # 1-1 Coding
347
+ attr_accessor :reason # 0-1 Coding
348
+ attr_accessor :amount # 0-1 Quantity
349
+ attr_accessor :value # 0-1 decimal
350
+ end
351
+
352
+ class Subdetail < FHIR::Model
353
+ include FHIR::Hashable
354
+ include FHIR::Json
355
+ include FHIR::Xml
356
+
357
+ METADATA = {
358
+ 'id' => {'type'=>'id', 'path'=>'Subdetail.id', 'min'=>0, 'max'=>1},
359
+ 'extension' => {'type'=>'Extension', 'path'=>'Subdetail.extension', 'min'=>0, 'max'=>Float::INFINITY},
360
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Subdetail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
361
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Subdetail.sequence', 'min'=>1, 'max'=>1},
362
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActCode'=>['_ActInvoiceInterGroupCode', 'CPNDDRGING', 'CPNDINDING', 'CPNDSUPING', 'DRUGING', 'FRAMEING', 'LENSING', 'PRDING', '_ActInvoiceRootGroupCode', 'CPINV', 'CSINV', 'CSPINV', 'FININV', 'OHSINV', 'PAINV', 'RXCINV', 'RXDINV', 'SBFINV', 'VRXINV']}, 'type'=>'Coding', 'path'=>'Subdetail.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-ActInvoiceGroupCode'}},
363
+ 'service' => {'valid_codes'=>{'http://hl7.org/fhir/ex-USCLS'=>['1101', '1102', '1103', '1201', '1205', '2101', '2102', '2141', '2601', '11101', '11102', '11103', '11104', '21211', '21212', '27211', '99111', '99333', '99555']}, 'type'=>'Coding', 'path'=>'Subdetail.service', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/service-uscls'}},
364
+ 'programCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-programcode'=>['AS', 'HD', 'AUSCR']}, 'type'=>'Coding', 'path'=>'Subdetail.programCode', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ex-program-code'}},
365
+ 'quantity' => {'type'=>'Quantity', 'path'=>'Subdetail.quantity', 'min'=>0, 'max'=>1},
366
+ 'unitPrice' => {'type'=>'Quantity', 'path'=>'Subdetail.unitPrice', 'min'=>0, 'max'=>1},
367
+ 'factor' => {'type'=>'decimal', 'path'=>'Subdetail.factor', 'min'=>0, 'max'=>1},
368
+ 'points' => {'type'=>'decimal', 'path'=>'Subdetail.points', 'min'=>0, 'max'=>1},
369
+ 'net' => {'type'=>'Quantity', 'path'=>'Subdetail.net', 'min'=>0, 'max'=>1},
370
+ 'udi' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'Subdetail.udi', 'min'=>0, 'max'=>Float::INFINITY},
371
+ 'adjudication' => {'type'=>'ExplanationOfBenefit::Item::Detail::Subdetail::Adjudication', 'path'=>'Subdetail.adjudication', 'min'=>0, 'max'=>Float::INFINITY}
372
+ }
373
+
374
+ class Adjudication < FHIR::Model
375
+ include FHIR::Hashable
376
+ include FHIR::Json
377
+ include FHIR::Xml
378
+
379
+ METADATA = {
380
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
381
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
382
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
383
+ 'category' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication'=>['total', 'copay', 'eligible', 'deductible', 'eligpercent', 'tax', 'benefit']}, 'type'=>'Coding', 'path'=>'Adjudication.category', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication'}},
384
+ 'reason' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication-reason'=>['ar001', 'ar002']}, 'type'=>'Coding', 'path'=>'Adjudication.reason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication-reason'}},
385
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
386
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
387
+ }
388
+
389
+ attr_accessor :id # 0-1 id
390
+ attr_accessor :extension # 0-* [ Extension ]
391
+ attr_accessor :modifierExtension # 0-* [ Extension ]
392
+ attr_accessor :category # 1-1 Coding
393
+ attr_accessor :reason # 0-1 Coding
394
+ attr_accessor :amount # 0-1 Quantity
395
+ attr_accessor :value # 0-1 decimal
396
+ end
397
+
398
+ attr_accessor :id # 0-1 id
399
+ attr_accessor :extension # 0-* [ Extension ]
400
+ attr_accessor :modifierExtension # 0-* [ Extension ]
401
+ attr_accessor :sequence # 1-1 positiveInt
402
+ attr_accessor :type # 1-1 Coding
403
+ attr_accessor :service # 1-1 Coding
404
+ attr_accessor :programCode # 0-* [ Coding ]
405
+ attr_accessor :quantity # 0-1 Quantity
406
+ attr_accessor :unitPrice # 0-1 Quantity
407
+ attr_accessor :factor # 0-1 decimal
408
+ attr_accessor :points # 0-1 decimal
409
+ attr_accessor :net # 0-1 Quantity
410
+ attr_accessor :udi # 0-* [ Reference(Device) ]
411
+ attr_accessor :adjudication # 0-* [ ExplanationOfBenefit::Item::Detail::Subdetail::Adjudication ]
412
+ end
413
+
414
+ class Subadjudication < FHIR::Model
415
+ include FHIR::Hashable
416
+ include FHIR::Json
417
+ include FHIR::Xml
418
+
419
+
420
+ end
421
+
422
+ attr_accessor :id # 0-1 id
423
+ attr_accessor :extension # 0-* [ Extension ]
424
+ attr_accessor :modifierExtension # 0-* [ Extension ]
425
+ attr_accessor :sequence # 1-1 positiveInt
426
+ attr_accessor :type # 1-1 Coding
427
+ attr_accessor :service # 1-1 Coding
428
+ attr_accessor :programCode # 0-* [ Coding ]
429
+ attr_accessor :quantity # 0-1 Quantity
430
+ attr_accessor :unitPrice # 0-1 Quantity
431
+ attr_accessor :factor # 0-1 decimal
432
+ attr_accessor :points # 0-1 decimal
433
+ attr_accessor :net # 0-1 Quantity
434
+ attr_accessor :udi # 0-* [ Reference(Device) ]
435
+ attr_accessor :adjudication # 0-* [ ExplanationOfBenefit::Item::Detail::Adjudication ]
436
+ attr_accessor :subDetail # 0-* [ ExplanationOfBenefit::Item::Detail::Subdetail ]
437
+ end
438
+
439
+ class Prosthesis < FHIR::Model
440
+ include FHIR::Hashable
441
+ include FHIR::Json
442
+ include FHIR::Xml
443
+
444
+ METADATA = {
445
+ 'id' => {'type'=>'id', 'path'=>'Prosthesis.id', 'min'=>0, 'max'=>1},
446
+ 'extension' => {'type'=>'Extension', 'path'=>'Prosthesis.extension', 'min'=>0, 'max'=>Float::INFINITY},
447
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Prosthesis.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
448
+ 'initial' => {'type'=>'boolean', 'path'=>'Prosthesis.initial', 'min'=>0, 'max'=>1},
449
+ 'priorDate' => {'type'=>'date', 'path'=>'Prosthesis.priorDate', 'min'=>0, 'max'=>1},
450
+ 'priorMaterial' => {'valid_codes'=>{'http://hl7.org/fhir/ex-oralprostho'=>['1', '2', '3', '4']}, 'type'=>'Coding', 'path'=>'Prosthesis.priorMaterial', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/oral-prosthodontic-material'}}
451
+ }
452
+
453
+ attr_accessor :id # 0-1 id
454
+ attr_accessor :extension # 0-* [ Extension ]
455
+ attr_accessor :modifierExtension # 0-* [ Extension ]
456
+ attr_accessor :initial # 0-1 boolean
457
+ attr_accessor :priorDate # 0-1 date
458
+ attr_accessor :priorMaterial # 0-1 Coding
459
+ end
460
+
461
+ attr_accessor :id # 0-1 id
462
+ attr_accessor :extension # 0-* [ Extension ]
463
+ attr_accessor :modifierExtension # 0-* [ Extension ]
464
+ attr_accessor :sequence # 1-1 positiveInt
465
+ attr_accessor :type # 1-1 Coding
466
+ attr_accessor :providerIdentifier # 0-1 Identifier
467
+ attr_accessor :providerReference # 0-1 Reference(Practitioner)
468
+ attr_accessor :supervisorIdentifier # 0-1 Identifier
469
+ attr_accessor :supervisorReference # 0-1 Reference(Practitioner)
470
+ attr_accessor :providerQualification # 0-1 Coding
471
+ attr_accessor :diagnosisLinkId # 0-* [ positiveInt ]
472
+ attr_accessor :service # 1-1 Coding
473
+ attr_accessor :serviceModifier # 0-* [ Coding ]
474
+ attr_accessor :modifier # 0-* [ Coding ]
475
+ attr_accessor :programCode # 0-* [ Coding ]
476
+ attr_accessor :servicedDate # 0-1 date
477
+ attr_accessor :servicedPeriod # 0-1 Period
478
+ attr_accessor :place # 0-1 Coding
479
+ attr_accessor :quantity # 0-1 Quantity
480
+ attr_accessor :unitPrice # 0-1 Quantity
481
+ attr_accessor :factor # 0-1 decimal
482
+ attr_accessor :points # 0-1 decimal
483
+ attr_accessor :net # 0-1 Quantity
484
+ attr_accessor :udi # 0-* [ Reference(Device) ]
485
+ attr_accessor :bodySite # 0-1 Coding
486
+ attr_accessor :subSite # 0-* [ Coding ]
487
+ attr_accessor :noteNumber # 0-* [ positiveInt ]
488
+ attr_accessor :adjudication # 0-* [ ExplanationOfBenefit::Item::Adjudication ]
489
+ attr_accessor :detail # 0-* [ ExplanationOfBenefit::Item::Detail ]
490
+ attr_accessor :prosthesis # 0-1 ExplanationOfBenefit::Item::Prosthesis
491
+ end
492
+
493
+ class Additem < FHIR::Model
494
+ include FHIR::Hashable
495
+ include FHIR::Json
496
+ include FHIR::Xml
497
+
498
+ METADATA = {
499
+ 'id' => {'type'=>'id', 'path'=>'Additem.id', 'min'=>0, 'max'=>1},
500
+ 'extension' => {'type'=>'Extension', 'path'=>'Additem.extension', 'min'=>0, 'max'=>Float::INFINITY},
501
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Additem.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
502
+ 'sequenceLinkId' => {'type'=>'positiveInt', 'path'=>'Additem.sequenceLinkId', 'min'=>0, 'max'=>Float::INFINITY},
503
+ 'service' => {'valid_codes'=>{'http://hl7.org/fhir/ex-USCLS'=>['1101', '1102', '1103', '1201', '1205', '2101', '2102', '2141', '2601', '11101', '11102', '11103', '11104', '21211', '21212', '27211', '99111', '99333', '99555']}, 'type'=>'Coding', 'path'=>'Additem.service', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/service-uscls'}},
504
+ 'fee' => {'type'=>'Quantity', 'path'=>'Additem.fee', 'min'=>0, 'max'=>1},
505
+ 'noteNumberLinkId' => {'type'=>'positiveInt', 'path'=>'Additem.noteNumberLinkId', 'min'=>0, 'max'=>Float::INFINITY},
506
+ 'adjudication' => {'type'=>'ExplanationOfBenefit::Additem::Adjudication', 'path'=>'Additem.adjudication', 'min'=>0, 'max'=>Float::INFINITY},
507
+ 'detail' => {'type'=>'ExplanationOfBenefit::Additem::Detail', 'path'=>'Additem.detail', 'min'=>0, 'max'=>Float::INFINITY}
508
+ }
509
+
510
+ class Adjudication < FHIR::Model
511
+ include FHIR::Hashable
512
+ include FHIR::Json
513
+ include FHIR::Xml
514
+
515
+ METADATA = {
516
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
517
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
518
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
519
+ 'category' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication'=>['total', 'copay', 'eligible', 'deductible', 'eligpercent', 'tax', 'benefit']}, 'type'=>'Coding', 'path'=>'Adjudication.category', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication'}},
520
+ 'reason' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication-reason'=>['ar001', 'ar002']}, 'type'=>'Coding', 'path'=>'Adjudication.reason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication-reason'}},
521
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
522
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
523
+ }
524
+
525
+ attr_accessor :id # 0-1 id
526
+ attr_accessor :extension # 0-* [ Extension ]
527
+ attr_accessor :modifierExtension # 0-* [ Extension ]
528
+ attr_accessor :category # 1-1 Coding
529
+ attr_accessor :reason # 0-1 Coding
530
+ attr_accessor :amount # 0-1 Quantity
531
+ attr_accessor :value # 0-1 decimal
532
+ end
533
+
534
+ class Detail < FHIR::Model
535
+ include FHIR::Hashable
536
+ include FHIR::Json
537
+ include FHIR::Xml
538
+
539
+ METADATA = {
540
+ 'id' => {'type'=>'id', 'path'=>'Detail.id', 'min'=>0, 'max'=>1},
541
+ 'extension' => {'type'=>'Extension', 'path'=>'Detail.extension', 'min'=>0, 'max'=>Float::INFINITY},
542
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Detail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
543
+ 'service' => {'valid_codes'=>{'http://hl7.org/fhir/ex-USCLS'=>['1101', '1102', '1103', '1201', '1205', '2101', '2102', '2141', '2601', '11101', '11102', '11103', '11104', '21211', '21212', '27211', '99111', '99333', '99555']}, 'type'=>'Coding', 'path'=>'Detail.service', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/service-uscls'}},
544
+ 'fee' => {'type'=>'Quantity', 'path'=>'Detail.fee', 'min'=>0, 'max'=>1},
545
+ 'adjudication' => {'type'=>'ExplanationOfBenefit::Additem::Detail::Adjudication', 'path'=>'Detail.adjudication', 'min'=>0, 'max'=>Float::INFINITY}
546
+ }
547
+
548
+ class Adjudication < FHIR::Model
549
+ include FHIR::Hashable
550
+ include FHIR::Json
551
+ include FHIR::Xml
552
+
553
+ METADATA = {
554
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
555
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
556
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
557
+ 'category' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication'=>['total', 'copay', 'eligible', 'deductible', 'eligpercent', 'tax', 'benefit']}, 'type'=>'Coding', 'path'=>'Adjudication.category', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication'}},
558
+ 'reason' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication-reason'=>['ar001', 'ar002']}, 'type'=>'Coding', 'path'=>'Adjudication.reason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication-reason'}},
559
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
560
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
561
+ }
562
+
563
+ attr_accessor :id # 0-1 id
564
+ attr_accessor :extension # 0-* [ Extension ]
565
+ attr_accessor :modifierExtension # 0-* [ Extension ]
566
+ attr_accessor :category # 1-1 Coding
567
+ attr_accessor :reason # 0-1 Coding
568
+ attr_accessor :amount # 0-1 Quantity
569
+ attr_accessor :value # 0-1 decimal
570
+ end
571
+
572
+ attr_accessor :id # 0-1 id
573
+ attr_accessor :extension # 0-* [ Extension ]
574
+ attr_accessor :modifierExtension # 0-* [ Extension ]
575
+ attr_accessor :service # 1-1 Coding
576
+ attr_accessor :fee # 0-1 Quantity
577
+ attr_accessor :adjudication # 0-* [ ExplanationOfBenefit::Additem::Detail::Adjudication ]
578
+ end
579
+
580
+ attr_accessor :id # 0-1 id
581
+ attr_accessor :extension # 0-* [ Extension ]
582
+ attr_accessor :modifierExtension # 0-* [ Extension ]
583
+ attr_accessor :sequenceLinkId # 0-* [ positiveInt ]
584
+ attr_accessor :service # 1-1 Coding
585
+ attr_accessor :fee # 0-1 Quantity
586
+ attr_accessor :noteNumberLinkId # 0-* [ positiveInt ]
587
+ attr_accessor :adjudication # 0-* [ ExplanationOfBenefit::Additem::Adjudication ]
588
+ attr_accessor :detail # 0-* [ ExplanationOfBenefit::Additem::Detail ]
589
+ end
590
+
591
+ class Missingteeth < FHIR::Model
592
+ include FHIR::Hashable
593
+ include FHIR::Json
594
+ include FHIR::Xml
595
+
596
+ METADATA = {
597
+ 'id' => {'type'=>'id', 'path'=>'Missingteeth.id', 'min'=>0, 'max'=>1},
598
+ 'extension' => {'type'=>'Extension', 'path'=>'Missingteeth.extension', 'min'=>0, 'max'=>Float::INFINITY},
599
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Missingteeth.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
600
+ 'tooth' => {'valid_codes'=>{'http://hl7.org/fhir/ex-fdi'=>['11', '12', '13', '14', '15', '16', '17', '18', '21', '22', '23', '24', '25', '26', '27', '28', '31', '32', '33', '34', '35', '36', '37', '38', '41', '42', '43', '44', '45', '46', '47', '48']}, 'type'=>'Coding', 'path'=>'Missingteeth.tooth', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/teeth'}},
601
+ 'reason' => {'valid_codes'=>{'http://hl7.org/fhir/missingtoothreason'=>['E', 'C', 'U', 'O']}, 'type'=>'Coding', 'path'=>'Missingteeth.reason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/missing-tooth-reason'}},
602
+ 'extractionDate' => {'type'=>'date', 'path'=>'Missingteeth.extractionDate', 'min'=>0, 'max'=>1}
603
+ }
604
+
605
+ attr_accessor :id # 0-1 id
606
+ attr_accessor :extension # 0-* [ Extension ]
607
+ attr_accessor :modifierExtension # 0-* [ Extension ]
608
+ attr_accessor :tooth # 1-1 Coding
609
+ attr_accessor :reason # 0-1 Coding
610
+ attr_accessor :extractionDate # 0-1 date
611
+ end
612
+
613
+ class Note < FHIR::Model
614
+ include FHIR::Hashable
615
+ include FHIR::Json
616
+ include FHIR::Xml
617
+
618
+ METADATA = {
619
+ 'id' => {'type'=>'id', 'path'=>'Note.id', 'min'=>0, 'max'=>1},
620
+ 'extension' => {'type'=>'Extension', 'path'=>'Note.extension', 'min'=>0, 'max'=>Float::INFINITY},
621
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Note.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
622
+ 'number' => {'type'=>'positiveInt', 'path'=>'Note.number', 'min'=>0, 'max'=>1},
623
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/note-type'=>['display', 'print', 'printoper']}, 'type'=>'Coding', 'path'=>'Note.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/note-type'}},
624
+ 'text' => {'type'=>'string', 'path'=>'Note.text', 'min'=>0, 'max'=>1}
625
+ }
626
+
627
+ attr_accessor :id # 0-1 id
628
+ attr_accessor :extension # 0-* [ Extension ]
629
+ attr_accessor :modifierExtension # 0-* [ Extension ]
630
+ attr_accessor :number # 0-1 positiveInt
631
+ attr_accessor :type # 0-1 Coding
632
+ attr_accessor :text # 0-1 string
633
+ end
634
+
635
+ class Benefitbalance < FHIR::Model
636
+ include FHIR::Hashable
637
+ include FHIR::Json
638
+ include FHIR::Xml
639
+
640
+ METADATA = {
641
+ 'id' => {'type'=>'id', 'path'=>'Benefitbalance.id', 'min'=>0, 'max'=>1},
642
+ 'extension' => {'type'=>'Extension', 'path'=>'Benefitbalance.extension', 'min'=>0, 'max'=>Float::INFINITY},
643
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Benefitbalance.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
644
+ 'category' => {'valid_codes'=>{'http://hl7.org/fhir/benefit-category'=>['oral', 'vision', 'medical', 'pharmacy']}, 'type'=>'Coding', 'path'=>'Benefitbalance.category', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/benefit-category'}},
645
+ 'subCategory' => {'valid_codes'=>{'http://hl7.org/fhir/benefit-subcategory'=>['oral-basic', 'oral-major', 'oral-ortho', 'vision-exam', 'vision-glasses', 'vision-contacts', 'medical-primarycare', 'pharmacy-dispense']}, 'type'=>'Coding', 'path'=>'Benefitbalance.subCategory', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/benefit-subcategory'}},
646
+ 'network' => {'valid_codes'=>{'http://hl7.org/fhir/benefit-network'=>['in', 'out']}, 'type'=>'Coding', 'path'=>'Benefitbalance.network', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/benefit-network'}},
647
+ 'unit' => {'valid_codes'=>{'http://hl7.org/fhir/benefit-unit'=>['individual', 'family']}, 'type'=>'Coding', 'path'=>'Benefitbalance.unit', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/benefit-unit'}},
648
+ 'term' => {'valid_codes'=>{'http://hl7.org/fhir/benefit-term'=>['annual', 'lifetime']}, 'type'=>'Coding', 'path'=>'Benefitbalance.term', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/benefit-term'}},
649
+ 'financial' => {'type'=>'ExplanationOfBenefit::Benefitbalance::Financial', 'path'=>'Benefitbalance.financial', 'min'=>0, 'max'=>Float::INFINITY}
650
+ }
651
+
652
+ class Financial < FHIR::Model
653
+ include FHIR::Hashable
654
+ include FHIR::Json
655
+ include FHIR::Xml
656
+
657
+ MULTIPLE_TYPES = {
658
+ 'benefit' => ['unsignedInt', 'Quantity'],
659
+ 'benefitUsed' => ['unsignedInt', 'Quantity']
660
+ }
661
+ METADATA = {
662
+ 'id' => {'type'=>'id', 'path'=>'Financial.id', 'min'=>0, 'max'=>1},
663
+ 'extension' => {'type'=>'Extension', 'path'=>'Financial.extension', 'min'=>0, 'max'=>Float::INFINITY},
664
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Financial.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
665
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/benefit-type'=>['deductable', 'visit', 'copay', 'vision-exam', 'vision-glasses', 'vision-contacts', 'medical-primarycare', 'pharmacy-dispense']}, 'type'=>'Coding', 'path'=>'Financial.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/benefit-type'}},
666
+ 'benefitUnsignedInt' => {'type'=>'unsignedInt', 'path'=>'Financial.benefit[x]', 'min'=>0, 'max'=>1},
667
+ 'benefitQuantity' => {'type'=>'Quantity', 'path'=>'Financial.benefit[x]', 'min'=>0, 'max'=>1},
668
+ 'benefitUsedUnsignedInt' => {'type'=>'unsignedInt', 'path'=>'Financial.benefitUsed[x]', 'min'=>0, 'max'=>1},
669
+ 'benefitUsedQuantity' => {'type'=>'Quantity', 'path'=>'Financial.benefitUsed[x]', 'min'=>0, 'max'=>1}
670
+ }
671
+
672
+ attr_accessor :id # 0-1 id
673
+ attr_accessor :extension # 0-* [ Extension ]
674
+ attr_accessor :modifierExtension # 0-* [ Extension ]
675
+ attr_accessor :type # 1-1 Coding
676
+ attr_accessor :benefitUnsignedInt # 0-1 unsignedInt
677
+ attr_accessor :benefitQuantity # 0-1 Quantity
678
+ attr_accessor :benefitUsedUnsignedInt # 0-1 unsignedInt
679
+ attr_accessor :benefitUsedQuantity # 0-1 Quantity
680
+ end
681
+
682
+ attr_accessor :id # 0-1 id
683
+ attr_accessor :extension # 0-* [ Extension ]
684
+ attr_accessor :modifierExtension # 0-* [ Extension ]
685
+ attr_accessor :category # 1-1 Coding
686
+ attr_accessor :subCategory # 0-1 Coding
687
+ attr_accessor :network # 0-1 Coding
688
+ attr_accessor :unit # 0-1 Coding
689
+ attr_accessor :term # 0-1 Coding
690
+ attr_accessor :financial # 0-* [ ExplanationOfBenefit::Benefitbalance::Financial ]
691
+ end
692
+
693
+ attr_accessor :id # 0-1 id
694
+ attr_accessor :meta # 0-1 Meta
695
+ attr_accessor :implicitRules # 0-1 uri
696
+ attr_accessor :language # 0-1 code
697
+ attr_accessor :text # 0-1 Narrative
698
+ attr_accessor :contained # 0-* [ Resource ]
699
+ attr_accessor :extension # 0-* [ Extension ]
700
+ attr_accessor :modifierExtension # 0-* [ Extension ]
701
+ attr_accessor :identifier # 0-* [ Identifier ]
702
+ attr_accessor :claimIdentifier # 0-1 Identifier
703
+ attr_accessor :claimReference # 0-1 Reference(Claim)
704
+ attr_accessor :claimResponseIdentifier # 0-1 Identifier
705
+ attr_accessor :claimResponseReference # 0-1 Reference(ClaimResponse)
706
+ attr_accessor :subType # 0-* [ Coding ]
707
+ attr_accessor :ruleset # 0-1 Coding
708
+ attr_accessor :originalRuleset # 0-1 Coding
709
+ attr_accessor :created # 0-1 dateTime
710
+ attr_accessor :billablePeriod # 0-1 Period
711
+ attr_accessor :disposition # 0-1 string
712
+ attr_accessor :providerIdentifier # 0-1 Identifier
713
+ attr_accessor :providerReference # 0-1 Reference(Practitioner)
714
+ attr_accessor :organizationIdentifier # 0-1 Identifier
715
+ attr_accessor :organizationReference # 0-1 Reference(Organization)
716
+ attr_accessor :facilityIdentifier # 0-1 Identifier
717
+ attr_accessor :facilityReference # 0-1 Reference(Location)
718
+ attr_accessor :related # 0-* [ ExplanationOfBenefit::Related ]
719
+ attr_accessor :prescriptionIdentifier # 0-1 Identifier
720
+ attr_accessor :prescriptionReference # 0-1 Reference(MedicationOrder|VisionPrescription)
721
+ attr_accessor :originalPrescriptionIdentifier # 0-1 Identifier
722
+ attr_accessor :originalPrescriptionReference # 0-1 Reference(MedicationOrder)
723
+ attr_accessor :payee # 0-1 ExplanationOfBenefit::Payee
724
+ attr_accessor :referralIdentifier # 0-1 Identifier
725
+ attr_accessor :referralReference # 0-1 Reference(ReferralRequest)
726
+ attr_accessor :occurrenceCode # 0-* [ Coding ]
727
+ attr_accessor :occurenceSpanCode # 0-* [ Coding ]
728
+ attr_accessor :valueCode # 0-* [ Coding ]
729
+ attr_accessor :diagnosis # 0-* [ ExplanationOfBenefit::Diagnosis ]
730
+ attr_accessor :procedure # 0-* [ ExplanationOfBenefit::Procedure ]
731
+ attr_accessor :specialCondition # 0-* [ Coding ]
732
+ attr_accessor :patientIdentifier # 1-1 Identifier
733
+ attr_accessor :patientReference # 1-1 Reference(Patient)
734
+ attr_accessor :precedence # 0-1 positiveInt
735
+ attr_accessor :coverage # 1-1 ExplanationOfBenefit::Coverage
736
+ attr_accessor :accidentDate # 0-1 date
737
+ attr_accessor :accidentType # 0-1 Coding
738
+ attr_accessor :accidentLocationAddress # 0-1 Address
739
+ attr_accessor :accidentLocationReference # 0-1 Reference(Location)
740
+ attr_accessor :interventionException # 0-* [ Coding ]
741
+ attr_accessor :onset # 0-* [ ExplanationOfBenefit::Onset ]
742
+ attr_accessor :employmentImpacted # 0-1 Period
743
+ attr_accessor :hospitalization # 0-1 Period
744
+ attr_accessor :item # 0-* [ ExplanationOfBenefit::Item ]
745
+ attr_accessor :addItem # 0-* [ ExplanationOfBenefit::Additem ]
746
+ attr_accessor :missingTeeth # 0-* [ ExplanationOfBenefit::Missingteeth ]
747
+ attr_accessor :totalCost # 0-1 Quantity
748
+ attr_accessor :unallocDeductable # 0-1 Quantity
749
+ attr_accessor :totalBenefit # 0-1 Quantity
750
+ attr_accessor :paymentAdjustment # 0-1 Quantity
751
+ attr_accessor :paymentAdjustmentReason # 0-1 Coding
752
+ attr_accessor :paymentDate # 0-1 date
753
+ attr_accessor :paymentAmount # 0-1 Quantity
754
+ attr_accessor :paymentRef # 0-1 Identifier
755
+ attr_accessor :reserved # 0-1 Coding
756
+ attr_accessor :form # 0-1 Coding
757
+ attr_accessor :note # 0-* [ ExplanationOfBenefit::Note ]
758
+ attr_accessor :benefitBalance # 0-* [ ExplanationOfBenefit::Benefitbalance ]
759
+
760
+ def resourceType
761
+ 'ExplanationOfBenefit'
762
+ end
763
+ end
764
+ end