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,490 @@
1
+ module FHIR
2
+ class Claim < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ MULTIPLE_TYPES = {
8
+ 'target' => ['Identifier', 'Reference'],
9
+ 'provider' => ['Identifier', 'Reference'],
10
+ 'organization' => ['Identifier', 'Reference'],
11
+ 'enterer' => ['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 = ["created", "facilityidentifier", "facilityreference", "identifier", "organizationidentifier", "organizationreference", "patientidentifier", "patientreference", "priority", "provideridentifier", "providerreference", "targetidentifier", "targetreference", "use"]
20
+ METADATA = {
21
+ 'id' => {'type'=>'id', 'path'=>'Claim.id', 'min'=>0, 'max'=>1},
22
+ 'meta' => {'type'=>'Meta', 'path'=>'Claim.meta', 'min'=>0, 'max'=>1},
23
+ 'implicitRules' => {'type'=>'uri', 'path'=>'Claim.implicitRules', 'min'=>0, 'max'=>1},
24
+ 'language' => {'type'=>'code', 'path'=>'Claim.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
25
+ 'text' => {'type'=>'Narrative', 'path'=>'Claim.text', 'min'=>0, 'max'=>1},
26
+ 'contained' => {'type'=>'Resource', 'path'=>'Claim.contained', 'min'=>0, 'max'=>Float::INFINITY},
27
+ 'extension' => {'type'=>'Extension', 'path'=>'Claim.extension', 'min'=>0, 'max'=>Float::INFINITY},
28
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Claim.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
29
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/claim-type-link'=>['institutional', 'oral', 'pharmacy', 'professional', 'vision']}, 'type'=>'code', 'path'=>'Claim.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/claim-type-link'}},
30
+ 'subType' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimsubtype'=>['ortho', 'emergency']}, 'type'=>'Coding', 'path'=>'Claim.subType', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/claim-subtype'}},
31
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Claim.identifier', 'min'=>0, 'max'=>Float::INFINITY},
32
+ 'ruleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'Claim.ruleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
33
+ 'originalRuleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'Claim.originalRuleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
34
+ 'created' => {'type'=>'dateTime', 'path'=>'Claim.created', 'min'=>0, 'max'=>1},
35
+ 'billablePeriod' => {'type'=>'Period', 'path'=>'Claim.billablePeriod', 'min'=>0, 'max'=>1},
36
+ 'targetIdentifier' => {'type'=>'Identifier', 'path'=>'Claim.target[x]', 'min'=>0, 'max'=>1},
37
+ 'targetReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Claim.target[x]', 'min'=>0, 'max'=>1},
38
+ 'providerIdentifier' => {'type'=>'Identifier', 'path'=>'Claim.provider[x]', 'min'=>0, 'max'=>1},
39
+ 'providerReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'Claim.provider[x]', 'min'=>0, 'max'=>1},
40
+ 'organizationIdentifier' => {'type'=>'Identifier', 'path'=>'Claim.organization[x]', 'min'=>0, 'max'=>1},
41
+ 'organizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Claim.organization[x]', 'min'=>0, 'max'=>1},
42
+ 'use' => {'valid_codes'=>{'http://hl7.org/fhir/claim-use-link'=>['complete', 'proposed', 'exploratory', 'other']}, 'type'=>'code', 'path'=>'Claim.use', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/claim-use-link'}},
43
+ 'priority' => {'valid_codes'=>{'http://hl7.org/fhir/processpriority'=>['stat', 'normal', 'deferred']}, 'type'=>'Coding', 'path'=>'Claim.priority', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/process-priority'}},
44
+ 'fundsReserve' => {'valid_codes'=>{'http://hl7.org/fhir/fundsreserve'=>['patient', 'provider', 'none']}, 'type'=>'Coding', 'path'=>'Claim.fundsReserve', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/fundsreserve'}},
45
+ 'entererIdentifier' => {'type'=>'Identifier', 'path'=>'Claim.enterer[x]', 'min'=>0, 'max'=>1},
46
+ 'entererReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'Claim.enterer[x]', 'min'=>0, 'max'=>1},
47
+ 'facilityIdentifier' => {'type'=>'Identifier', 'path'=>'Claim.facility[x]', 'min'=>0, 'max'=>1},
48
+ 'facilityReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Claim.facility[x]', 'min'=>0, 'max'=>1},
49
+ 'related' => {'type'=>'Claim::Related', 'path'=>'Claim.related', 'min'=>0, 'max'=>Float::INFINITY},
50
+ 'prescriptionIdentifier' => {'type'=>'Identifier', 'path'=>'Claim.prescription[x]', 'min'=>0, 'max'=>1},
51
+ 'prescriptionReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/MedicationOrder', 'http://hl7.org/fhir/StructureDefinition/VisionPrescription'], 'type'=>'Reference', 'path'=>'Claim.prescription[x]', 'min'=>0, 'max'=>1},
52
+ 'originalPrescriptionIdentifier' => {'type'=>'Identifier', 'path'=>'Claim.originalPrescription[x]', 'min'=>0, 'max'=>1},
53
+ 'originalPrescriptionReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/MedicationOrder'], 'type'=>'Reference', 'path'=>'Claim.originalPrescription[x]', 'min'=>0, 'max'=>1},
54
+ 'payee' => {'type'=>'Claim::Payee', 'path'=>'Claim.payee', 'min'=>0, 'max'=>1},
55
+ 'referralIdentifier' => {'type'=>'Identifier', 'path'=>'Claim.referral[x]', 'min'=>0, 'max'=>1},
56
+ 'referralReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/ReferralRequest'], 'type'=>'Reference', 'path'=>'Claim.referral[x]', 'min'=>0, 'max'=>1},
57
+ 'occurrenceCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimoccurrance'=>['1001', '1002']}, 'type'=>'Coding', 'path'=>'Claim.occurrenceCode', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/occurrence-codes'}},
58
+ 'occurenceSpanCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimoccurrancespan'=>['1001', '1002']}, 'type'=>'Coding', 'path'=>'Claim.occurenceSpanCode', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/occurrence-span-codes'}},
59
+ 'valueCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimvalue'=>['1001', '1002']}, 'type'=>'Coding', 'path'=>'Claim.valueCode', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/value-codes'}},
60
+ 'diagnosis' => {'type'=>'Claim::Diagnosis', 'path'=>'Claim.diagnosis', 'min'=>0, 'max'=>Float::INFINITY},
61
+ 'procedure' => {'type'=>'Claim::Procedure', 'path'=>'Claim.procedure', 'min'=>0, 'max'=>Float::INFINITY},
62
+ 'specialCondition' => {'valid_codes'=>{'http://hl7.org/fhir/fm-conditions'=>['123987']}, 'type'=>'Coding', 'path'=>'Claim.specialCondition', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/fm-conditions'}},
63
+ 'patientIdentifier' => {'type'=>'Identifier', 'path'=>'Claim.patient[x]', 'min'=>1, 'max'=>1},
64
+ 'patientReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'Claim.patient[x]', 'min'=>1, 'max'=>1},
65
+ 'coverage' => {'type'=>'Claim::Coverage', 'path'=>'Claim.coverage', 'min'=>0, 'max'=>Float::INFINITY},
66
+ 'accidentDate' => {'type'=>'date', 'path'=>'Claim.accidentDate', 'min'=>0, 'max'=>1},
67
+ 'accidentType' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActCode'=>['MVA', 'SCHOOL', 'SPT', 'WPA']}, 'type'=>'Coding', 'path'=>'Claim.accidentType', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-ActIncidentCode'}},
68
+ 'accidentLocationAddress' => {'type'=>'Address', 'path'=>'Claim.accidentLocation[x]', 'min'=>0, 'max'=>1},
69
+ 'accidentLocationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Claim.accidentLocation[x]', 'min'=>0, 'max'=>1},
70
+ 'interventionException' => {'valid_codes'=>{'http://hl7.org/fhir/intervention'=>['unknown', 'other']}, 'type'=>'Coding', 'path'=>'Claim.interventionException', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/intervention'}},
71
+ 'onset' => {'type'=>'Claim::Onset', 'path'=>'Claim.onset', 'min'=>0, 'max'=>Float::INFINITY},
72
+ 'employmentImpacted' => {'type'=>'Period', 'path'=>'Claim.employmentImpacted', 'min'=>0, 'max'=>1},
73
+ 'hospitalization' => {'type'=>'Period', 'path'=>'Claim.hospitalization', 'min'=>0, 'max'=>1},
74
+ 'item' => {'type'=>'Claim::Item', 'path'=>'Claim.item', 'min'=>0, 'max'=>Float::INFINITY},
75
+ 'total' => {'type'=>'Quantity', 'path'=>'Claim.total', 'min'=>0, 'max'=>1},
76
+ 'additionalMaterial' => {'valid_codes'=>{'http://hl7.org/fhir/additionalmaterials'=>['xray', 'image', 'email', 'model', 'document', 'other']}, 'type'=>'Coding', 'path'=>'Claim.additionalMaterial', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/additionalmaterials'}},
77
+ 'missingTeeth' => {'type'=>'Claim::Missingteeth', 'path'=>'Claim.missingTeeth', 'min'=>0, 'max'=>Float::INFINITY}
78
+ }
79
+
80
+ class Related < FHIR::Model
81
+ include FHIR::Hashable
82
+ include FHIR::Json
83
+ include FHIR::Xml
84
+
85
+ MULTIPLE_TYPES = {
86
+ 'claim' => ['Identifier', 'Reference']
87
+ }
88
+ METADATA = {
89
+ 'id' => {'type'=>'id', 'path'=>'Related.id', 'min'=>0, 'max'=>1},
90
+ 'extension' => {'type'=>'Extension', 'path'=>'Related.extension', 'min'=>0, 'max'=>Float::INFINITY},
91
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Related.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
92
+ 'claimIdentifier' => {'type'=>'Identifier', 'path'=>'Related.claim[x]', 'min'=>0, 'max'=>1},
93
+ 'claimReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Claim'], 'type'=>'Reference', 'path'=>'Related.claim[x]', 'min'=>0, 'max'=>1},
94
+ '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'}},
95
+ 'reference' => {'type'=>'Identifier', 'path'=>'Related.reference', 'min'=>0, 'max'=>1}
96
+ }
97
+
98
+ attr_accessor :id # 0-1 id
99
+ attr_accessor :extension # 0-* [ Extension ]
100
+ attr_accessor :modifierExtension # 0-* [ Extension ]
101
+ attr_accessor :claimIdentifier # 0-1 Identifier
102
+ attr_accessor :claimReference # 0-1 Reference(Claim)
103
+ attr_accessor :relationship # 0-1 Coding
104
+ attr_accessor :reference # 0-1 Identifier
105
+ end
106
+
107
+ class Payee < FHIR::Model
108
+ include FHIR::Hashable
109
+ include FHIR::Json
110
+ include FHIR::Xml
111
+
112
+ MULTIPLE_TYPES = {
113
+ 'party' => ['Identifier', 'Reference']
114
+ }
115
+ METADATA = {
116
+ 'id' => {'type'=>'id', 'path'=>'Payee.id', 'min'=>0, 'max'=>1},
117
+ 'extension' => {'type'=>'Extension', 'path'=>'Payee.extension', 'min'=>0, 'max'=>Float::INFINITY},
118
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Payee.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
119
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/payeetype'=>['subscriber', 'provider', 'other']}, 'type'=>'Coding', 'path'=>'Payee.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/payeetype'}},
120
+ 'partyIdentifier' => {'type'=>'Identifier', 'path'=>'Payee.party[x]', 'min'=>0, 'max'=>1},
121
+ '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}
122
+ }
123
+
124
+ attr_accessor :id # 0-1 id
125
+ attr_accessor :extension # 0-* [ Extension ]
126
+ attr_accessor :modifierExtension # 0-* [ Extension ]
127
+ attr_accessor :type # 1-1 Coding
128
+ attr_accessor :partyIdentifier # 0-1 Identifier
129
+ attr_accessor :partyReference # 0-1 Reference(Practitioner|Organization|Patient|RelatedPerson)
130
+ end
131
+
132
+ class Diagnosis < FHIR::Model
133
+ include FHIR::Hashable
134
+ include FHIR::Json
135
+ include FHIR::Xml
136
+
137
+ METADATA = {
138
+ 'id' => {'type'=>'id', 'path'=>'Diagnosis.id', 'min'=>0, 'max'=>1},
139
+ 'extension' => {'type'=>'Extension', 'path'=>'Diagnosis.extension', 'min'=>0, 'max'=>Float::INFINITY},
140
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Diagnosis.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
141
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Diagnosis.sequence', 'min'=>1, 'max'=>1},
142
+ 'diagnosis' => {'type'=>'Coding', 'path'=>'Diagnosis.diagnosis', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/icd-10'}}
143
+ }
144
+
145
+ attr_accessor :id # 0-1 id
146
+ attr_accessor :extension # 0-* [ Extension ]
147
+ attr_accessor :modifierExtension # 0-* [ Extension ]
148
+ attr_accessor :sequence # 1-1 positiveInt
149
+ attr_accessor :diagnosis # 1-1 Coding
150
+ end
151
+
152
+ class Procedure < FHIR::Model
153
+ include FHIR::Hashable
154
+ include FHIR::Json
155
+ include FHIR::Xml
156
+
157
+ MULTIPLE_TYPES = {
158
+ 'procedure' => ['Coding', 'Reference']
159
+ }
160
+ METADATA = {
161
+ 'id' => {'type'=>'id', 'path'=>'Procedure.id', 'min'=>0, 'max'=>1},
162
+ 'extension' => {'type'=>'Extension', 'path'=>'Procedure.extension', 'min'=>0, 'max'=>Float::INFINITY},
163
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Procedure.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
164
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Procedure.sequence', 'min'=>1, 'max'=>1},
165
+ 'date' => {'type'=>'dateTime', 'path'=>'Procedure.date', 'min'=>0, 'max'=>1},
166
+ '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'}},
167
+ 'procedureReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Procedure'], 'type'=>'Reference', 'path'=>'Procedure.procedure[x]', 'min'=>1, 'max'=>1}
168
+ }
169
+
170
+ attr_accessor :id # 0-1 id
171
+ attr_accessor :extension # 0-* [ Extension ]
172
+ attr_accessor :modifierExtension # 0-* [ Extension ]
173
+ attr_accessor :sequence # 1-1 positiveInt
174
+ attr_accessor :date # 0-1 dateTime
175
+ attr_accessor :procedureCoding # 1-1 Coding
176
+ attr_accessor :procedureReference # 1-1 Reference(Procedure)
177
+ end
178
+
179
+ class Coverage < FHIR::Model
180
+ include FHIR::Hashable
181
+ include FHIR::Json
182
+ include FHIR::Xml
183
+
184
+ MULTIPLE_TYPES = {
185
+ 'coverage' => ['Identifier', 'Reference']
186
+ }
187
+ METADATA = {
188
+ 'id' => {'type'=>'id', 'path'=>'Coverage.id', 'min'=>0, 'max'=>1},
189
+ 'extension' => {'type'=>'Extension', 'path'=>'Coverage.extension', 'min'=>0, 'max'=>Float::INFINITY},
190
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Coverage.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
191
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Coverage.sequence', 'min'=>1, 'max'=>1},
192
+ 'focal' => {'type'=>'boolean', 'path'=>'Coverage.focal', 'min'=>1, 'max'=>1},
193
+ 'coverageIdentifier' => {'type'=>'Identifier', 'path'=>'Coverage.coverage[x]', 'min'=>1, 'max'=>1},
194
+ 'coverageReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Coverage'], 'type'=>'Reference', 'path'=>'Coverage.coverage[x]', 'min'=>1, 'max'=>1},
195
+ 'businessArrangement' => {'type'=>'string', 'path'=>'Coverage.businessArrangement', 'min'=>0, 'max'=>1},
196
+ 'preAuthRef' => {'type'=>'string', 'path'=>'Coverage.preAuthRef', 'min'=>0, 'max'=>Float::INFINITY},
197
+ 'claimResponse' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/ClaimResponse'], 'type'=>'Reference', 'path'=>'Coverage.claimResponse', 'min'=>0, 'max'=>1},
198
+ 'originalRuleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'Coverage.originalRuleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}}
199
+ }
200
+
201
+ attr_accessor :id # 0-1 id
202
+ attr_accessor :extension # 0-* [ Extension ]
203
+ attr_accessor :modifierExtension # 0-* [ Extension ]
204
+ attr_accessor :sequence # 1-1 positiveInt
205
+ attr_accessor :focal # 1-1 boolean
206
+ attr_accessor :coverageIdentifier # 1-1 Identifier
207
+ attr_accessor :coverageReference # 1-1 Reference(Coverage)
208
+ attr_accessor :businessArrangement # 0-1 string
209
+ attr_accessor :preAuthRef # 0-* [ string ]
210
+ attr_accessor :claimResponse # 0-1 Reference(ClaimResponse)
211
+ attr_accessor :originalRuleset # 0-1 Coding
212
+ end
213
+
214
+ class Onset < FHIR::Model
215
+ include FHIR::Hashable
216
+ include FHIR::Json
217
+ include FHIR::Xml
218
+
219
+ MULTIPLE_TYPES = {
220
+ 'time' => ['date', 'Period']
221
+ }
222
+ METADATA = {
223
+ 'id' => {'type'=>'id', 'path'=>'Onset.id', 'min'=>0, 'max'=>1},
224
+ 'extension' => {'type'=>'Extension', 'path'=>'Onset.extension', 'min'=>0, 'max'=>Float::INFINITY},
225
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Onset.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
226
+ 'timeDate' => {'type'=>'date', 'path'=>'Onset.time[x]', 'min'=>0, 'max'=>1},
227
+ 'timePeriod' => {'type'=>'Period', 'path'=>'Onset.time[x]', 'min'=>0, 'max'=>1},
228
+ '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'}}
229
+ }
230
+
231
+ attr_accessor :id # 0-1 id
232
+ attr_accessor :extension # 0-* [ Extension ]
233
+ attr_accessor :modifierExtension # 0-* [ Extension ]
234
+ attr_accessor :timeDate # 0-1 date
235
+ attr_accessor :timePeriod # 0-1 Period
236
+ attr_accessor :type # 0-1 Coding
237
+ end
238
+
239
+ class Item < FHIR::Model
240
+ include FHIR::Hashable
241
+ include FHIR::Json
242
+ include FHIR::Xml
243
+
244
+ MULTIPLE_TYPES = {
245
+ 'provider' => ['Identifier', 'Reference'],
246
+ 'supervisor' => ['Identifier', 'Reference'],
247
+ 'serviced' => ['date', 'Period']
248
+ }
249
+ METADATA = {
250
+ 'id' => {'type'=>'id', 'path'=>'Item.id', 'min'=>0, 'max'=>1},
251
+ 'extension' => {'type'=>'Extension', 'path'=>'Item.extension', 'min'=>0, 'max'=>Float::INFINITY},
252
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Item.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
253
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Item.sequence', 'min'=>1, 'max'=>1},
254
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/claim-exception'=>['student', 'disabled']}, 'type'=>'Coding', 'path'=>'Item.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/fm-itemtype'}},
255
+ 'providerIdentifier' => {'type'=>'Identifier', 'path'=>'Item.provider[x]', 'min'=>0, 'max'=>1},
256
+ 'providerReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'Item.provider[x]', 'min'=>0, 'max'=>1},
257
+ 'supervisorIdentifier' => {'type'=>'Identifier', 'path'=>'Item.supervisor[x]', 'min'=>0, 'max'=>1},
258
+ 'supervisorReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'Item.supervisor[x]', 'min'=>0, 'max'=>1},
259
+ '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'}},
260
+ 'diagnosisLinkId' => {'type'=>'positiveInt', 'path'=>'Item.diagnosisLinkId', 'min'=>0, 'max'=>Float::INFINITY},
261
+ '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'}},
262
+ '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'}},
263
+ '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'}},
264
+ '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'}},
265
+ 'servicedDate' => {'type'=>'date', 'path'=>'Item.serviced[x]', 'min'=>0, 'max'=>1},
266
+ 'servicedPeriod' => {'type'=>'Period', 'path'=>'Item.serviced[x]', 'min'=>0, 'max'=>1},
267
+ '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'}},
268
+ 'quantity' => {'type'=>'Quantity', 'path'=>'Item.quantity', 'min'=>0, 'max'=>1},
269
+ 'unitPrice' => {'type'=>'Quantity', 'path'=>'Item.unitPrice', 'min'=>0, 'max'=>1},
270
+ 'factor' => {'type'=>'decimal', 'path'=>'Item.factor', 'min'=>0, 'max'=>1},
271
+ 'points' => {'type'=>'decimal', 'path'=>'Item.points', 'min'=>0, 'max'=>1},
272
+ 'net' => {'type'=>'Quantity', 'path'=>'Item.net', 'min'=>0, 'max'=>1},
273
+ 'udi' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'Item.udi', 'min'=>0, 'max'=>Float::INFINITY},
274
+ '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'}},
275
+ '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'}},
276
+ 'detail' => {'type'=>'Claim::Item::Detail', 'path'=>'Item.detail', 'min'=>0, 'max'=>Float::INFINITY},
277
+ 'prosthesis' => {'type'=>'Claim::Item::Prosthesis', 'path'=>'Item.prosthesis', 'min'=>0, 'max'=>1}
278
+ }
279
+
280
+ class Detail < FHIR::Model
281
+ include FHIR::Hashable
282
+ include FHIR::Json
283
+ include FHIR::Xml
284
+
285
+ METADATA = {
286
+ 'id' => {'type'=>'id', 'path'=>'Detail.id', 'min'=>0, 'max'=>1},
287
+ 'extension' => {'type'=>'Extension', 'path'=>'Detail.extension', 'min'=>0, 'max'=>Float::INFINITY},
288
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Detail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
289
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Detail.sequence', 'min'=>1, 'max'=>1},
290
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/claim-exception'=>['student', 'disabled']}, 'type'=>'Coding', 'path'=>'Detail.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/fm-itemtype'}},
291
+ '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'}},
292
+ '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'}},
293
+ 'quantity' => {'type'=>'Quantity', 'path'=>'Detail.quantity', 'min'=>0, 'max'=>1},
294
+ 'unitPrice' => {'type'=>'Quantity', 'path'=>'Detail.unitPrice', 'min'=>0, 'max'=>1},
295
+ 'factor' => {'type'=>'decimal', 'path'=>'Detail.factor', 'min'=>0, 'max'=>1},
296
+ 'points' => {'type'=>'decimal', 'path'=>'Detail.points', 'min'=>0, 'max'=>1},
297
+ 'net' => {'type'=>'Quantity', 'path'=>'Detail.net', 'min'=>0, 'max'=>1},
298
+ 'udi' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'Detail.udi', 'min'=>0, 'max'=>Float::INFINITY},
299
+ 'subDetail' => {'type'=>'Claim::Item::Detail::Subdetail', 'path'=>'Detail.subDetail', 'min'=>0, 'max'=>Float::INFINITY}
300
+ }
301
+
302
+ class Subdetail < FHIR::Model
303
+ include FHIR::Hashable
304
+ include FHIR::Json
305
+ include FHIR::Xml
306
+
307
+ METADATA = {
308
+ 'id' => {'type'=>'id', 'path'=>'Subdetail.id', 'min'=>0, 'max'=>1},
309
+ 'extension' => {'type'=>'Extension', 'path'=>'Subdetail.extension', 'min'=>0, 'max'=>Float::INFINITY},
310
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Subdetail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
311
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Subdetail.sequence', 'min'=>1, 'max'=>1},
312
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/claim-exception'=>['student', 'disabled']}, 'type'=>'Coding', 'path'=>'Subdetail.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/fm-itemtype'}},
313
+ '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'}},
314
+ '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'}},
315
+ 'quantity' => {'type'=>'Quantity', 'path'=>'Subdetail.quantity', 'min'=>0, 'max'=>1},
316
+ 'unitPrice' => {'type'=>'Quantity', 'path'=>'Subdetail.unitPrice', 'min'=>0, 'max'=>1},
317
+ 'factor' => {'type'=>'decimal', 'path'=>'Subdetail.factor', 'min'=>0, 'max'=>1},
318
+ 'points' => {'type'=>'decimal', 'path'=>'Subdetail.points', 'min'=>0, 'max'=>1},
319
+ 'net' => {'type'=>'Quantity', 'path'=>'Subdetail.net', 'min'=>0, 'max'=>1},
320
+ 'udi' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'Subdetail.udi', 'min'=>0, 'max'=>Float::INFINITY}
321
+ }
322
+
323
+ attr_accessor :id # 0-1 id
324
+ attr_accessor :extension # 0-* [ Extension ]
325
+ attr_accessor :modifierExtension # 0-* [ Extension ]
326
+ attr_accessor :sequence # 1-1 positiveInt
327
+ attr_accessor :type # 1-1 Coding
328
+ attr_accessor :service # 1-1 Coding
329
+ attr_accessor :programCode # 0-* [ Coding ]
330
+ attr_accessor :quantity # 0-1 Quantity
331
+ attr_accessor :unitPrice # 0-1 Quantity
332
+ attr_accessor :factor # 0-1 decimal
333
+ attr_accessor :points # 0-1 decimal
334
+ attr_accessor :net # 0-1 Quantity
335
+ attr_accessor :udi # 0-* [ Reference(Device) ]
336
+ end
337
+
338
+ attr_accessor :id # 0-1 id
339
+ attr_accessor :extension # 0-* [ Extension ]
340
+ attr_accessor :modifierExtension # 0-* [ Extension ]
341
+ attr_accessor :sequence # 1-1 positiveInt
342
+ attr_accessor :type # 1-1 Coding
343
+ attr_accessor :service # 1-1 Coding
344
+ attr_accessor :programCode # 0-* [ Coding ]
345
+ attr_accessor :quantity # 0-1 Quantity
346
+ attr_accessor :unitPrice # 0-1 Quantity
347
+ attr_accessor :factor # 0-1 decimal
348
+ attr_accessor :points # 0-1 decimal
349
+ attr_accessor :net # 0-1 Quantity
350
+ attr_accessor :udi # 0-* [ Reference(Device) ]
351
+ attr_accessor :subDetail # 0-* [ Claim::Item::Detail::Subdetail ]
352
+ end
353
+
354
+ class Prosthesis < FHIR::Model
355
+ include FHIR::Hashable
356
+ include FHIR::Json
357
+ include FHIR::Xml
358
+
359
+ METADATA = {
360
+ 'id' => {'type'=>'id', 'path'=>'Prosthesis.id', 'min'=>0, 'max'=>1},
361
+ 'extension' => {'type'=>'Extension', 'path'=>'Prosthesis.extension', 'min'=>0, 'max'=>Float::INFINITY},
362
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Prosthesis.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
363
+ 'initial' => {'type'=>'boolean', 'path'=>'Prosthesis.initial', 'min'=>0, 'max'=>1},
364
+ 'priorDate' => {'type'=>'date', 'path'=>'Prosthesis.priorDate', 'min'=>0, 'max'=>1},
365
+ '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'}}
366
+ }
367
+
368
+ attr_accessor :id # 0-1 id
369
+ attr_accessor :extension # 0-* [ Extension ]
370
+ attr_accessor :modifierExtension # 0-* [ Extension ]
371
+ attr_accessor :initial # 0-1 boolean
372
+ attr_accessor :priorDate # 0-1 date
373
+ attr_accessor :priorMaterial # 0-1 Coding
374
+ end
375
+
376
+ attr_accessor :id # 0-1 id
377
+ attr_accessor :extension # 0-* [ Extension ]
378
+ attr_accessor :modifierExtension # 0-* [ Extension ]
379
+ attr_accessor :sequence # 1-1 positiveInt
380
+ attr_accessor :type # 1-1 Coding
381
+ attr_accessor :providerIdentifier # 0-1 Identifier
382
+ attr_accessor :providerReference # 0-1 Reference(Practitioner)
383
+ attr_accessor :supervisorIdentifier # 0-1 Identifier
384
+ attr_accessor :supervisorReference # 0-1 Reference(Practitioner)
385
+ attr_accessor :providerQualification # 0-1 Coding
386
+ attr_accessor :diagnosisLinkId # 0-* [ positiveInt ]
387
+ attr_accessor :service # 1-1 Coding
388
+ attr_accessor :serviceModifier # 0-* [ Coding ]
389
+ attr_accessor :modifier # 0-* [ Coding ]
390
+ attr_accessor :programCode # 0-* [ Coding ]
391
+ attr_accessor :servicedDate # 0-1 date
392
+ attr_accessor :servicedPeriod # 0-1 Period
393
+ attr_accessor :place # 0-1 Coding
394
+ attr_accessor :quantity # 0-1 Quantity
395
+ attr_accessor :unitPrice # 0-1 Quantity
396
+ attr_accessor :factor # 0-1 decimal
397
+ attr_accessor :points # 0-1 decimal
398
+ attr_accessor :net # 0-1 Quantity
399
+ attr_accessor :udi # 0-* [ Reference(Device) ]
400
+ attr_accessor :bodySite # 0-1 Coding
401
+ attr_accessor :subSite # 0-* [ Coding ]
402
+ attr_accessor :detail # 0-* [ Claim::Item::Detail ]
403
+ attr_accessor :prosthesis # 0-1 Claim::Item::Prosthesis
404
+ end
405
+
406
+ class Missingteeth < FHIR::Model
407
+ include FHIR::Hashable
408
+ include FHIR::Json
409
+ include FHIR::Xml
410
+
411
+ METADATA = {
412
+ 'id' => {'type'=>'id', 'path'=>'Missingteeth.id', 'min'=>0, 'max'=>1},
413
+ 'extension' => {'type'=>'Extension', 'path'=>'Missingteeth.extension', 'min'=>0, 'max'=>Float::INFINITY},
414
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Missingteeth.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
415
+ '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'}},
416
+ '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'}},
417
+ 'extractionDate' => {'type'=>'date', 'path'=>'Missingteeth.extractionDate', 'min'=>0, 'max'=>1}
418
+ }
419
+
420
+ attr_accessor :id # 0-1 id
421
+ attr_accessor :extension # 0-* [ Extension ]
422
+ attr_accessor :modifierExtension # 0-* [ Extension ]
423
+ attr_accessor :tooth # 1-1 Coding
424
+ attr_accessor :reason # 0-1 Coding
425
+ attr_accessor :extractionDate # 0-1 date
426
+ end
427
+
428
+ attr_accessor :id # 0-1 id
429
+ attr_accessor :meta # 0-1 Meta
430
+ attr_accessor :implicitRules # 0-1 uri
431
+ attr_accessor :language # 0-1 code
432
+ attr_accessor :text # 0-1 Narrative
433
+ attr_accessor :contained # 0-* [ Resource ]
434
+ attr_accessor :extension # 0-* [ Extension ]
435
+ attr_accessor :modifierExtension # 0-* [ Extension ]
436
+ attr_accessor :type # 1-1 code
437
+ attr_accessor :subType # 0-* [ Coding ]
438
+ attr_accessor :identifier # 0-* [ Identifier ]
439
+ attr_accessor :ruleset # 0-1 Coding
440
+ attr_accessor :originalRuleset # 0-1 Coding
441
+ attr_accessor :created # 0-1 dateTime
442
+ attr_accessor :billablePeriod # 0-1 Period
443
+ attr_accessor :targetIdentifier # 0-1 Identifier
444
+ attr_accessor :targetReference # 0-1 Reference(Organization)
445
+ attr_accessor :providerIdentifier # 0-1 Identifier
446
+ attr_accessor :providerReference # 0-1 Reference(Practitioner)
447
+ attr_accessor :organizationIdentifier # 0-1 Identifier
448
+ attr_accessor :organizationReference # 0-1 Reference(Organization)
449
+ attr_accessor :use # 0-1 code
450
+ attr_accessor :priority # 0-1 Coding
451
+ attr_accessor :fundsReserve # 0-1 Coding
452
+ attr_accessor :entererIdentifier # 0-1 Identifier
453
+ attr_accessor :entererReference # 0-1 Reference(Practitioner)
454
+ attr_accessor :facilityIdentifier # 0-1 Identifier
455
+ attr_accessor :facilityReference # 0-1 Reference(Location)
456
+ attr_accessor :related # 0-* [ Claim::Related ]
457
+ attr_accessor :prescriptionIdentifier # 0-1 Identifier
458
+ attr_accessor :prescriptionReference # 0-1 Reference(MedicationOrder|VisionPrescription)
459
+ attr_accessor :originalPrescriptionIdentifier # 0-1 Identifier
460
+ attr_accessor :originalPrescriptionReference # 0-1 Reference(MedicationOrder)
461
+ attr_accessor :payee # 0-1 Claim::Payee
462
+ attr_accessor :referralIdentifier # 0-1 Identifier
463
+ attr_accessor :referralReference # 0-1 Reference(ReferralRequest)
464
+ attr_accessor :occurrenceCode # 0-* [ Coding ]
465
+ attr_accessor :occurenceSpanCode # 0-* [ Coding ]
466
+ attr_accessor :valueCode # 0-* [ Coding ]
467
+ attr_accessor :diagnosis # 0-* [ Claim::Diagnosis ]
468
+ attr_accessor :procedure # 0-* [ Claim::Procedure ]
469
+ attr_accessor :specialCondition # 0-* [ Coding ]
470
+ attr_accessor :patientIdentifier # 1-1 Identifier
471
+ attr_accessor :patientReference # 1-1 Reference(Patient)
472
+ attr_accessor :coverage # 0-* [ Claim::Coverage ]
473
+ attr_accessor :accidentDate # 0-1 date
474
+ attr_accessor :accidentType # 0-1 Coding
475
+ attr_accessor :accidentLocationAddress # 0-1 Address
476
+ attr_accessor :accidentLocationReference # 0-1 Reference(Location)
477
+ attr_accessor :interventionException # 0-* [ Coding ]
478
+ attr_accessor :onset # 0-* [ Claim::Onset ]
479
+ attr_accessor :employmentImpacted # 0-1 Period
480
+ attr_accessor :hospitalization # 0-1 Period
481
+ attr_accessor :item # 0-* [ Claim::Item ]
482
+ attr_accessor :total # 0-1 Quantity
483
+ attr_accessor :additionalMaterial # 0-* [ Coding ]
484
+ attr_accessor :missingTeeth # 0-* [ Claim::Missingteeth ]
485
+
486
+ def resourceType
487
+ 'Claim'
488
+ end
489
+ end
490
+ end