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,421 @@
1
+ module FHIR
2
+ class ClaimResponse < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ MULTIPLE_TYPES = {
8
+ 'request' => ['Identifier', 'Reference'],
9
+ 'organization' => ['Identifier', 'Reference'],
10
+ 'requestProvider' => ['Identifier', 'Reference'],
11
+ 'requestOrganization' => ['Identifier', 'Reference']
12
+ }
13
+ SEARCH_PARAMS = ["created", "disposition", "identifier", "organizationidentifier", "organizationreference", "outcome", "paymentdate", "requestidentifier", "requestreference"]
14
+ METADATA = {
15
+ 'id' => {'type'=>'id', 'path'=>'ClaimResponse.id', 'min'=>0, 'max'=>1},
16
+ 'meta' => {'type'=>'Meta', 'path'=>'ClaimResponse.meta', 'min'=>0, 'max'=>1},
17
+ 'implicitRules' => {'type'=>'uri', 'path'=>'ClaimResponse.implicitRules', 'min'=>0, 'max'=>1},
18
+ 'language' => {'type'=>'code', 'path'=>'ClaimResponse.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
19
+ 'text' => {'type'=>'Narrative', 'path'=>'ClaimResponse.text', 'min'=>0, 'max'=>1},
20
+ 'contained' => {'type'=>'Resource', 'path'=>'ClaimResponse.contained', 'min'=>0, 'max'=>Float::INFINITY},
21
+ 'extension' => {'type'=>'Extension', 'path'=>'ClaimResponse.extension', 'min'=>0, 'max'=>Float::INFINITY},
22
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'ClaimResponse.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
23
+ 'identifier' => {'type'=>'Identifier', 'path'=>'ClaimResponse.identifier', 'min'=>0, 'max'=>Float::INFINITY},
24
+ 'requestIdentifier' => {'type'=>'Identifier', 'path'=>'ClaimResponse.request[x]', 'min'=>0, 'max'=>1},
25
+ 'requestReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Claim'], 'type'=>'Reference', 'path'=>'ClaimResponse.request[x]', 'min'=>0, 'max'=>1},
26
+ 'ruleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'ClaimResponse.ruleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
27
+ 'originalRuleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'ClaimResponse.originalRuleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
28
+ 'created' => {'type'=>'dateTime', 'path'=>'ClaimResponse.created', 'min'=>0, 'max'=>1},
29
+ 'organizationIdentifier' => {'type'=>'Identifier', 'path'=>'ClaimResponse.organization[x]', 'min'=>0, 'max'=>1},
30
+ 'organizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'ClaimResponse.organization[x]', 'min'=>0, 'max'=>1},
31
+ 'requestProviderIdentifier' => {'type'=>'Identifier', 'path'=>'ClaimResponse.requestProvider[x]', 'min'=>0, 'max'=>1},
32
+ 'requestProviderReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'ClaimResponse.requestProvider[x]', 'min'=>0, 'max'=>1},
33
+ 'requestOrganizationIdentifier' => {'type'=>'Identifier', 'path'=>'ClaimResponse.requestOrganization[x]', 'min'=>0, 'max'=>1},
34
+ 'requestOrganizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'ClaimResponse.requestOrganization[x]', 'min'=>0, 'max'=>1},
35
+ 'outcome' => {'valid_codes'=>{'http://hl7.org/fhir/remittance-outcome'=>['complete', 'error']}, 'type'=>'code', 'path'=>'ClaimResponse.outcome', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/remittance-outcome'}},
36
+ 'disposition' => {'type'=>'string', 'path'=>'ClaimResponse.disposition', 'min'=>0, 'max'=>1},
37
+ 'payeeType' => {'valid_codes'=>{'http://hl7.org/fhir/payeetype'=>['subscriber', 'provider', 'other']}, 'type'=>'Coding', 'path'=>'ClaimResponse.payeeType', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/payeetype'}},
38
+ 'item' => {'type'=>'ClaimResponse::Item', 'path'=>'ClaimResponse.item', 'min'=>0, 'max'=>Float::INFINITY},
39
+ 'addItem' => {'type'=>'ClaimResponse::Additem', 'path'=>'ClaimResponse.addItem', 'min'=>0, 'max'=>Float::INFINITY},
40
+ 'error' => {'type'=>'ClaimResponse::Error', 'path'=>'ClaimResponse.error', 'min'=>0, 'max'=>Float::INFINITY},
41
+ 'totalCost' => {'type'=>'Quantity', 'path'=>'ClaimResponse.totalCost', 'min'=>0, 'max'=>1},
42
+ 'unallocDeductable' => {'type'=>'Quantity', 'path'=>'ClaimResponse.unallocDeductable', 'min'=>0, 'max'=>1},
43
+ 'totalBenefit' => {'type'=>'Quantity', 'path'=>'ClaimResponse.totalBenefit', 'min'=>0, 'max'=>1},
44
+ 'paymentAdjustment' => {'type'=>'Quantity', 'path'=>'ClaimResponse.paymentAdjustment', 'min'=>0, 'max'=>1},
45
+ 'paymentAdjustmentReason' => {'valid_codes'=>{'http://hl7.org/fhir/payment-adjustment-reason'=>['a001', 'a002']}, 'type'=>'Coding', 'path'=>'ClaimResponse.paymentAdjustmentReason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/payment-adjustment-reason'}},
46
+ 'paymentDate' => {'type'=>'date', 'path'=>'ClaimResponse.paymentDate', 'min'=>0, 'max'=>1},
47
+ 'paymentAmount' => {'type'=>'Quantity', 'path'=>'ClaimResponse.paymentAmount', 'min'=>0, 'max'=>1},
48
+ 'paymentRef' => {'type'=>'Identifier', 'path'=>'ClaimResponse.paymentRef', 'min'=>0, 'max'=>1},
49
+ 'reserved' => {'valid_codes'=>{'http://hl7.org/fhir/fundsreserve'=>['patient', 'provider', 'none']}, 'type'=>'Coding', 'path'=>'ClaimResponse.reserved', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/fundsreserve'}},
50
+ 'form' => {'valid_codes'=>{'http://hl7.org/fhir/forms-codes'=>['1', '2']}, 'type'=>'Coding', 'path'=>'ClaimResponse.form', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/forms'}},
51
+ 'note' => {'type'=>'ClaimResponse::Note', 'path'=>'ClaimResponse.note', 'min'=>0, 'max'=>Float::INFINITY},
52
+ 'coverage' => {'type'=>'ClaimResponse::Coverage', 'path'=>'ClaimResponse.coverage', 'min'=>0, 'max'=>Float::INFINITY}
53
+ }
54
+
55
+ class Item < FHIR::Model
56
+ include FHIR::Hashable
57
+ include FHIR::Json
58
+ include FHIR::Xml
59
+
60
+ METADATA = {
61
+ 'id' => {'type'=>'id', 'path'=>'Item.id', 'min'=>0, 'max'=>1},
62
+ 'extension' => {'type'=>'Extension', 'path'=>'Item.extension', 'min'=>0, 'max'=>Float::INFINITY},
63
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Item.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
64
+ 'sequenceLinkId' => {'type'=>'positiveInt', 'path'=>'Item.sequenceLinkId', 'min'=>1, 'max'=>1},
65
+ 'noteNumber' => {'type'=>'positiveInt', 'path'=>'Item.noteNumber', 'min'=>0, 'max'=>Float::INFINITY},
66
+ 'adjudication' => {'type'=>'ClaimResponse::Item::Adjudication', 'path'=>'Item.adjudication', 'min'=>0, 'max'=>Float::INFINITY},
67
+ 'detail' => {'type'=>'ClaimResponse::Item::Detail', 'path'=>'Item.detail', 'min'=>0, 'max'=>Float::INFINITY}
68
+ }
69
+
70
+ class Adjudication < FHIR::Model
71
+ include FHIR::Hashable
72
+ include FHIR::Json
73
+ include FHIR::Xml
74
+
75
+ METADATA = {
76
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
77
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
78
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
79
+ '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'}},
80
+ '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'}},
81
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
82
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
83
+ }
84
+
85
+ attr_accessor :id # 0-1 id
86
+ attr_accessor :extension # 0-* [ Extension ]
87
+ attr_accessor :modifierExtension # 0-* [ Extension ]
88
+ attr_accessor :category # 1-1 Coding
89
+ attr_accessor :reason # 0-1 Coding
90
+ attr_accessor :amount # 0-1 Quantity
91
+ attr_accessor :value # 0-1 decimal
92
+ end
93
+
94
+ class Detail < FHIR::Model
95
+ include FHIR::Hashable
96
+ include FHIR::Json
97
+ include FHIR::Xml
98
+
99
+ METADATA = {
100
+ 'id' => {'type'=>'id', 'path'=>'Detail.id', 'min'=>0, 'max'=>1},
101
+ 'extension' => {'type'=>'Extension', 'path'=>'Detail.extension', 'min'=>0, 'max'=>Float::INFINITY},
102
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Detail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
103
+ 'sequenceLinkId' => {'type'=>'positiveInt', 'path'=>'Detail.sequenceLinkId', 'min'=>1, 'max'=>1},
104
+ 'adjudication' => {'type'=>'ClaimResponse::Item::Detail::Adjudication', 'path'=>'Detail.adjudication', 'min'=>0, 'max'=>Float::INFINITY},
105
+ 'subDetail' => {'type'=>'ClaimResponse::Item::Detail::Subdetail', 'path'=>'Detail.subDetail', 'min'=>0, 'max'=>Float::INFINITY}
106
+ }
107
+
108
+ class Adjudication < FHIR::Model
109
+ include FHIR::Hashable
110
+ include FHIR::Json
111
+ include FHIR::Xml
112
+
113
+ METADATA = {
114
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
115
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
116
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
117
+ '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'}},
118
+ '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'}},
119
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
120
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
121
+ }
122
+
123
+ attr_accessor :id # 0-1 id
124
+ attr_accessor :extension # 0-* [ Extension ]
125
+ attr_accessor :modifierExtension # 0-* [ Extension ]
126
+ attr_accessor :category # 1-1 Coding
127
+ attr_accessor :reason # 0-1 Coding
128
+ attr_accessor :amount # 0-1 Quantity
129
+ attr_accessor :value # 0-1 decimal
130
+ end
131
+
132
+ class Subdetail < FHIR::Model
133
+ include FHIR::Hashable
134
+ include FHIR::Json
135
+ include FHIR::Xml
136
+
137
+ METADATA = {
138
+ 'id' => {'type'=>'id', 'path'=>'Subdetail.id', 'min'=>0, 'max'=>1},
139
+ 'extension' => {'type'=>'Extension', 'path'=>'Subdetail.extension', 'min'=>0, 'max'=>Float::INFINITY},
140
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Subdetail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
141
+ 'sequenceLinkId' => {'type'=>'positiveInt', 'path'=>'Subdetail.sequenceLinkId', 'min'=>1, 'max'=>1},
142
+ 'adjudication' => {'type'=>'ClaimResponse::Item::Detail::Subdetail::Adjudication', 'path'=>'Subdetail.adjudication', 'min'=>0, 'max'=>Float::INFINITY}
143
+ }
144
+
145
+ class Adjudication < FHIR::Model
146
+ include FHIR::Hashable
147
+ include FHIR::Json
148
+ include FHIR::Xml
149
+
150
+ METADATA = {
151
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
152
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
153
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
154
+ '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'}},
155
+ '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'}},
156
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
157
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
158
+ }
159
+
160
+ attr_accessor :id # 0-1 id
161
+ attr_accessor :extension # 0-* [ Extension ]
162
+ attr_accessor :modifierExtension # 0-* [ Extension ]
163
+ attr_accessor :category # 1-1 Coding
164
+ attr_accessor :reason # 0-1 Coding
165
+ attr_accessor :amount # 0-1 Quantity
166
+ attr_accessor :value # 0-1 decimal
167
+ end
168
+
169
+ attr_accessor :id # 0-1 id
170
+ attr_accessor :extension # 0-* [ Extension ]
171
+ attr_accessor :modifierExtension # 0-* [ Extension ]
172
+ attr_accessor :sequenceLinkId # 1-1 positiveInt
173
+ attr_accessor :adjudication # 0-* [ ClaimResponse::Item::Detail::Subdetail::Adjudication ]
174
+ end
175
+
176
+ class Subadjudication < FHIR::Model
177
+ include FHIR::Hashable
178
+ include FHIR::Json
179
+ include FHIR::Xml
180
+
181
+
182
+ end
183
+
184
+ attr_accessor :id # 0-1 id
185
+ attr_accessor :extension # 0-* [ Extension ]
186
+ attr_accessor :modifierExtension # 0-* [ Extension ]
187
+ attr_accessor :sequenceLinkId # 1-1 positiveInt
188
+ attr_accessor :adjudication # 0-* [ ClaimResponse::Item::Detail::Adjudication ]
189
+ attr_accessor :subDetail # 0-* [ ClaimResponse::Item::Detail::Subdetail ]
190
+ end
191
+
192
+ attr_accessor :id # 0-1 id
193
+ attr_accessor :extension # 0-* [ Extension ]
194
+ attr_accessor :modifierExtension # 0-* [ Extension ]
195
+ attr_accessor :sequenceLinkId # 1-1 positiveInt
196
+ attr_accessor :noteNumber # 0-* [ positiveInt ]
197
+ attr_accessor :adjudication # 0-* [ ClaimResponse::Item::Adjudication ]
198
+ attr_accessor :detail # 0-* [ ClaimResponse::Item::Detail ]
199
+ end
200
+
201
+ class Additem < FHIR::Model
202
+ include FHIR::Hashable
203
+ include FHIR::Json
204
+ include FHIR::Xml
205
+
206
+ METADATA = {
207
+ 'id' => {'type'=>'id', 'path'=>'Additem.id', 'min'=>0, 'max'=>1},
208
+ 'extension' => {'type'=>'Extension', 'path'=>'Additem.extension', 'min'=>0, 'max'=>Float::INFINITY},
209
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Additem.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
210
+ 'sequenceLinkId' => {'type'=>'positiveInt', 'path'=>'Additem.sequenceLinkId', 'min'=>0, 'max'=>Float::INFINITY},
211
+ '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'}},
212
+ 'fee' => {'type'=>'Quantity', 'path'=>'Additem.fee', 'min'=>0, 'max'=>1},
213
+ 'noteNumberLinkId' => {'type'=>'positiveInt', 'path'=>'Additem.noteNumberLinkId', 'min'=>0, 'max'=>Float::INFINITY},
214
+ 'adjudication' => {'type'=>'ClaimResponse::Additem::Adjudication', 'path'=>'Additem.adjudication', 'min'=>0, 'max'=>Float::INFINITY},
215
+ 'detail' => {'type'=>'ClaimResponse::Additem::Detail', 'path'=>'Additem.detail', 'min'=>0, 'max'=>Float::INFINITY}
216
+ }
217
+
218
+ class Adjudication < FHIR::Model
219
+ include FHIR::Hashable
220
+ include FHIR::Json
221
+ include FHIR::Xml
222
+
223
+ METADATA = {
224
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
225
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
226
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
227
+ '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'}},
228
+ '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'}},
229
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
230
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
231
+ }
232
+
233
+ attr_accessor :id # 0-1 id
234
+ attr_accessor :extension # 0-* [ Extension ]
235
+ attr_accessor :modifierExtension # 0-* [ Extension ]
236
+ attr_accessor :category # 1-1 Coding
237
+ attr_accessor :reason # 0-1 Coding
238
+ attr_accessor :amount # 0-1 Quantity
239
+ attr_accessor :value # 0-1 decimal
240
+ end
241
+
242
+ class Detail < FHIR::Model
243
+ include FHIR::Hashable
244
+ include FHIR::Json
245
+ include FHIR::Xml
246
+
247
+ METADATA = {
248
+ 'id' => {'type'=>'id', 'path'=>'Detail.id', 'min'=>0, 'max'=>1},
249
+ 'extension' => {'type'=>'Extension', 'path'=>'Detail.extension', 'min'=>0, 'max'=>Float::INFINITY},
250
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Detail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
251
+ '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'}},
252
+ 'fee' => {'type'=>'Quantity', 'path'=>'Detail.fee', 'min'=>0, 'max'=>1},
253
+ 'adjudication' => {'type'=>'ClaimResponse::Additem::Detail::Adjudication', 'path'=>'Detail.adjudication', 'min'=>0, 'max'=>Float::INFINITY}
254
+ }
255
+
256
+ class Adjudication < FHIR::Model
257
+ include FHIR::Hashable
258
+ include FHIR::Json
259
+ include FHIR::Xml
260
+
261
+ METADATA = {
262
+ 'id' => {'type'=>'id', 'path'=>'Adjudication.id', 'min'=>0, 'max'=>1},
263
+ 'extension' => {'type'=>'Extension', 'path'=>'Adjudication.extension', 'min'=>0, 'max'=>Float::INFINITY},
264
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Adjudication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
265
+ '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'}},
266
+ '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'}},
267
+ 'amount' => {'type'=>'Quantity', 'path'=>'Adjudication.amount', 'min'=>0, 'max'=>1},
268
+ 'value' => {'type'=>'decimal', 'path'=>'Adjudication.value', 'min'=>0, 'max'=>1}
269
+ }
270
+
271
+ attr_accessor :id # 0-1 id
272
+ attr_accessor :extension # 0-* [ Extension ]
273
+ attr_accessor :modifierExtension # 0-* [ Extension ]
274
+ attr_accessor :category # 1-1 Coding
275
+ attr_accessor :reason # 0-1 Coding
276
+ attr_accessor :amount # 0-1 Quantity
277
+ attr_accessor :value # 0-1 decimal
278
+ end
279
+
280
+ attr_accessor :id # 0-1 id
281
+ attr_accessor :extension # 0-* [ Extension ]
282
+ attr_accessor :modifierExtension # 0-* [ Extension ]
283
+ attr_accessor :service # 1-1 Coding
284
+ attr_accessor :fee # 0-1 Quantity
285
+ attr_accessor :adjudication # 0-* [ ClaimResponse::Additem::Detail::Adjudication ]
286
+ end
287
+
288
+ attr_accessor :id # 0-1 id
289
+ attr_accessor :extension # 0-* [ Extension ]
290
+ attr_accessor :modifierExtension # 0-* [ Extension ]
291
+ attr_accessor :sequenceLinkId # 0-* [ positiveInt ]
292
+ attr_accessor :service # 1-1 Coding
293
+ attr_accessor :fee # 0-1 Quantity
294
+ attr_accessor :noteNumberLinkId # 0-* [ positiveInt ]
295
+ attr_accessor :adjudication # 0-* [ ClaimResponse::Additem::Adjudication ]
296
+ attr_accessor :detail # 0-* [ ClaimResponse::Additem::Detail ]
297
+ end
298
+
299
+ class Error < FHIR::Model
300
+ include FHIR::Hashable
301
+ include FHIR::Json
302
+ include FHIR::Xml
303
+
304
+ METADATA = {
305
+ 'id' => {'type'=>'id', 'path'=>'Error.id', 'min'=>0, 'max'=>1},
306
+ 'extension' => {'type'=>'Extension', 'path'=>'Error.extension', 'min'=>0, 'max'=>Float::INFINITY},
307
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Error.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
308
+ 'sequenceLinkId' => {'type'=>'positiveInt', 'path'=>'Error.sequenceLinkId', 'min'=>0, 'max'=>1},
309
+ 'detailSequenceLinkId' => {'type'=>'positiveInt', 'path'=>'Error.detailSequenceLinkId', 'min'=>0, 'max'=>1},
310
+ 'subdetailSequenceLinkId' => {'type'=>'positiveInt', 'path'=>'Error.subdetailSequenceLinkId', 'min'=>0, 'max'=>1},
311
+ 'code' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication-error'=>['a001', 'a002']}, 'type'=>'Coding', 'path'=>'Error.code', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication-error'}}
312
+ }
313
+
314
+ attr_accessor :id # 0-1 id
315
+ attr_accessor :extension # 0-* [ Extension ]
316
+ attr_accessor :modifierExtension # 0-* [ Extension ]
317
+ attr_accessor :sequenceLinkId # 0-1 positiveInt
318
+ attr_accessor :detailSequenceLinkId # 0-1 positiveInt
319
+ attr_accessor :subdetailSequenceLinkId # 0-1 positiveInt
320
+ attr_accessor :code # 1-1 Coding
321
+ end
322
+
323
+ class Note < FHIR::Model
324
+ include FHIR::Hashable
325
+ include FHIR::Json
326
+ include FHIR::Xml
327
+
328
+ METADATA = {
329
+ 'id' => {'type'=>'id', 'path'=>'Note.id', 'min'=>0, 'max'=>1},
330
+ 'extension' => {'type'=>'Extension', 'path'=>'Note.extension', 'min'=>0, 'max'=>Float::INFINITY},
331
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Note.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
332
+ 'number' => {'type'=>'positiveInt', 'path'=>'Note.number', 'min'=>0, 'max'=>1},
333
+ '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'}},
334
+ 'text' => {'type'=>'string', 'path'=>'Note.text', 'min'=>0, 'max'=>1}
335
+ }
336
+
337
+ attr_accessor :id # 0-1 id
338
+ attr_accessor :extension # 0-* [ Extension ]
339
+ attr_accessor :modifierExtension # 0-* [ Extension ]
340
+ attr_accessor :number # 0-1 positiveInt
341
+ attr_accessor :type # 0-1 Coding
342
+ attr_accessor :text # 0-1 string
343
+ end
344
+
345
+ class Coverage < FHIR::Model
346
+ include FHIR::Hashable
347
+ include FHIR::Json
348
+ include FHIR::Xml
349
+
350
+ MULTIPLE_TYPES = {
351
+ 'coverage' => ['Identifier', 'Reference']
352
+ }
353
+ METADATA = {
354
+ 'id' => {'type'=>'id', 'path'=>'Coverage.id', 'min'=>0, 'max'=>1},
355
+ 'extension' => {'type'=>'Extension', 'path'=>'Coverage.extension', 'min'=>0, 'max'=>Float::INFINITY},
356
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Coverage.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
357
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Coverage.sequence', 'min'=>1, 'max'=>1},
358
+ 'focal' => {'type'=>'boolean', 'path'=>'Coverage.focal', 'min'=>1, 'max'=>1},
359
+ 'coverageIdentifier' => {'type'=>'Identifier', 'path'=>'Coverage.coverage[x]', 'min'=>1, 'max'=>1},
360
+ 'coverageReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Coverage'], 'type'=>'Reference', 'path'=>'Coverage.coverage[x]', 'min'=>1, 'max'=>1},
361
+ 'businessArrangement' => {'type'=>'string', 'path'=>'Coverage.businessArrangement', 'min'=>0, 'max'=>1},
362
+ 'preAuthRef' => {'type'=>'string', 'path'=>'Coverage.preAuthRef', 'min'=>0, 'max'=>Float::INFINITY},
363
+ 'claimResponse' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/ClaimResponse'], 'type'=>'Reference', 'path'=>'Coverage.claimResponse', 'min'=>0, 'max'=>1}
364
+ }
365
+
366
+ attr_accessor :id # 0-1 id
367
+ attr_accessor :extension # 0-* [ Extension ]
368
+ attr_accessor :modifierExtension # 0-* [ Extension ]
369
+ attr_accessor :sequence # 1-1 positiveInt
370
+ attr_accessor :focal # 1-1 boolean
371
+ attr_accessor :coverageIdentifier # 1-1 Identifier
372
+ attr_accessor :coverageReference # 1-1 Reference(Coverage)
373
+ attr_accessor :businessArrangement # 0-1 string
374
+ attr_accessor :preAuthRef # 0-* [ string ]
375
+ attr_accessor :claimResponse # 0-1 Reference(ClaimResponse)
376
+ end
377
+
378
+ attr_accessor :id # 0-1 id
379
+ attr_accessor :meta # 0-1 Meta
380
+ attr_accessor :implicitRules # 0-1 uri
381
+ attr_accessor :language # 0-1 code
382
+ attr_accessor :text # 0-1 Narrative
383
+ attr_accessor :contained # 0-* [ Resource ]
384
+ attr_accessor :extension # 0-* [ Extension ]
385
+ attr_accessor :modifierExtension # 0-* [ Extension ]
386
+ attr_accessor :identifier # 0-* [ Identifier ]
387
+ attr_accessor :requestIdentifier # 0-1 Identifier
388
+ attr_accessor :requestReference # 0-1 Reference(Claim)
389
+ attr_accessor :ruleset # 0-1 Coding
390
+ attr_accessor :originalRuleset # 0-1 Coding
391
+ attr_accessor :created # 0-1 dateTime
392
+ attr_accessor :organizationIdentifier # 0-1 Identifier
393
+ attr_accessor :organizationReference # 0-1 Reference(Organization)
394
+ attr_accessor :requestProviderIdentifier # 0-1 Identifier
395
+ attr_accessor :requestProviderReference # 0-1 Reference(Practitioner)
396
+ attr_accessor :requestOrganizationIdentifier # 0-1 Identifier
397
+ attr_accessor :requestOrganizationReference # 0-1 Reference(Organization)
398
+ attr_accessor :outcome # 0-1 code
399
+ attr_accessor :disposition # 0-1 string
400
+ attr_accessor :payeeType # 0-1 Coding
401
+ attr_accessor :item # 0-* [ ClaimResponse::Item ]
402
+ attr_accessor :addItem # 0-* [ ClaimResponse::Additem ]
403
+ attr_accessor :error # 0-* [ ClaimResponse::Error ]
404
+ attr_accessor :totalCost # 0-1 Quantity
405
+ attr_accessor :unallocDeductable # 0-1 Quantity
406
+ attr_accessor :totalBenefit # 0-1 Quantity
407
+ attr_accessor :paymentAdjustment # 0-1 Quantity
408
+ attr_accessor :paymentAdjustmentReason # 0-1 Coding
409
+ attr_accessor :paymentDate # 0-1 date
410
+ attr_accessor :paymentAmount # 0-1 Quantity
411
+ attr_accessor :paymentRef # 0-1 Identifier
412
+ attr_accessor :reserved # 0-1 Coding
413
+ attr_accessor :form # 0-1 Coding
414
+ attr_accessor :note # 0-* [ ClaimResponse::Note ]
415
+ attr_accessor :coverage # 0-* [ ClaimResponse::Coverage ]
416
+
417
+ def resourceType
418
+ 'ClaimResponse'
419
+ end
420
+ end
421
+ end