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,90 @@
1
+ module FHIR
2
+ class EligibilityRequest < 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
+ 'patient' => ['Identifier', 'Reference'],
14
+ 'coverage' => ['Identifier', 'Reference'],
15
+ 'serviced' => ['date', 'Period']
16
+ }
17
+ SEARCH_PARAMS = ["created", "facilityidentifier", "facilityreference", "identifier", "organizationidentifier", "organizationreference", "patientidentifier", "patientreference", "provideridentifier", "providerreference"]
18
+ METADATA = {
19
+ 'id' => {'type'=>'id', 'path'=>'EligibilityRequest.id', 'min'=>0, 'max'=>1},
20
+ 'meta' => {'type'=>'Meta', 'path'=>'EligibilityRequest.meta', 'min'=>0, 'max'=>1},
21
+ 'implicitRules' => {'type'=>'uri', 'path'=>'EligibilityRequest.implicitRules', 'min'=>0, 'max'=>1},
22
+ 'language' => {'type'=>'code', 'path'=>'EligibilityRequest.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
23
+ 'text' => {'type'=>'Narrative', 'path'=>'EligibilityRequest.text', 'min'=>0, 'max'=>1},
24
+ 'contained' => {'type'=>'Resource', 'path'=>'EligibilityRequest.contained', 'min'=>0, 'max'=>Float::INFINITY},
25
+ 'extension' => {'type'=>'Extension', 'path'=>'EligibilityRequest.extension', 'min'=>0, 'max'=>Float::INFINITY},
26
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'EligibilityRequest.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
27
+ 'identifier' => {'type'=>'Identifier', 'path'=>'EligibilityRequest.identifier', 'min'=>0, 'max'=>Float::INFINITY},
28
+ 'ruleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'EligibilityRequest.ruleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
29
+ 'originalRuleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'EligibilityRequest.originalRuleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
30
+ 'created' => {'type'=>'dateTime', 'path'=>'EligibilityRequest.created', 'min'=>0, 'max'=>1},
31
+ 'targetIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityRequest.target[x]', 'min'=>0, 'max'=>1},
32
+ 'targetReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'EligibilityRequest.target[x]', 'min'=>0, 'max'=>1},
33
+ 'providerIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityRequest.provider[x]', 'min'=>0, 'max'=>1},
34
+ 'providerReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'EligibilityRequest.provider[x]', 'min'=>0, 'max'=>1},
35
+ 'organizationIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityRequest.organization[x]', 'min'=>0, 'max'=>1},
36
+ 'organizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'EligibilityRequest.organization[x]', 'min'=>0, 'max'=>1},
37
+ 'priority' => {'valid_codes'=>{'http://hl7.org/fhir/processpriority'=>['stat', 'normal', 'deferred']}, 'type'=>'Coding', 'path'=>'EligibilityRequest.priority', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/process-priority'}},
38
+ 'entererIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityRequest.enterer[x]', 'min'=>0, 'max'=>1},
39
+ 'entererReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'EligibilityRequest.enterer[x]', 'min'=>0, 'max'=>1},
40
+ 'facilityIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityRequest.facility[x]', 'min'=>0, 'max'=>1},
41
+ 'facilityReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'EligibilityRequest.facility[x]', 'min'=>0, 'max'=>1},
42
+ 'patientIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityRequest.patient[x]', 'min'=>0, 'max'=>1},
43
+ 'patientReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'EligibilityRequest.patient[x]', 'min'=>0, 'max'=>1},
44
+ 'coverageIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityRequest.coverage[x]', 'min'=>0, 'max'=>1},
45
+ 'coverageReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Coverage'], 'type'=>'Reference', 'path'=>'EligibilityRequest.coverage[x]', 'min'=>0, 'max'=>1},
46
+ 'businessArrangement' => {'type'=>'string', 'path'=>'EligibilityRequest.businessArrangement', 'min'=>0, 'max'=>1},
47
+ 'servicedDate' => {'type'=>'date', 'path'=>'EligibilityRequest.serviced[x]', 'min'=>0, 'max'=>1},
48
+ 'servicedPeriod' => {'type'=>'Period', 'path'=>'EligibilityRequest.serviced[x]', 'min'=>0, 'max'=>1},
49
+ 'benefitCategory' => {'valid_codes'=>{'http://hl7.org/fhir/benefit-category'=>['oral', 'vision', 'medical', 'pharmacy']}, 'type'=>'Coding', 'path'=>'EligibilityRequest.benefitCategory', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/benefit-category'}},
50
+ 'benefitSubCategory' => {'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'=>'EligibilityRequest.benefitSubCategory', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/benefit-subcategory'}}
51
+ }
52
+
53
+ attr_accessor :id # 0-1 id
54
+ attr_accessor :meta # 0-1 Meta
55
+ attr_accessor :implicitRules # 0-1 uri
56
+ attr_accessor :language # 0-1 code
57
+ attr_accessor :text # 0-1 Narrative
58
+ attr_accessor :contained # 0-* [ Resource ]
59
+ attr_accessor :extension # 0-* [ Extension ]
60
+ attr_accessor :modifierExtension # 0-* [ Extension ]
61
+ attr_accessor :identifier # 0-* [ Identifier ]
62
+ attr_accessor :ruleset # 0-1 Coding
63
+ attr_accessor :originalRuleset # 0-1 Coding
64
+ attr_accessor :created # 0-1 dateTime
65
+ attr_accessor :targetIdentifier # 0-1 Identifier
66
+ attr_accessor :targetReference # 0-1 Reference(Organization)
67
+ attr_accessor :providerIdentifier # 0-1 Identifier
68
+ attr_accessor :providerReference # 0-1 Reference(Practitioner)
69
+ attr_accessor :organizationIdentifier # 0-1 Identifier
70
+ attr_accessor :organizationReference # 0-1 Reference(Organization)
71
+ attr_accessor :priority # 0-1 Coding
72
+ attr_accessor :entererIdentifier # 0-1 Identifier
73
+ attr_accessor :entererReference # 0-1 Reference(Practitioner)
74
+ attr_accessor :facilityIdentifier # 0-1 Identifier
75
+ attr_accessor :facilityReference # 0-1 Reference(Location)
76
+ attr_accessor :patientIdentifier # 0-1 Identifier
77
+ attr_accessor :patientReference # 0-1 Reference(Patient)
78
+ attr_accessor :coverageIdentifier # 0-1 Identifier
79
+ attr_accessor :coverageReference # 0-1 Reference(Coverage)
80
+ attr_accessor :businessArrangement # 0-1 string
81
+ attr_accessor :servicedDate # 0-1 date
82
+ attr_accessor :servicedPeriod # 0-1 Period
83
+ attr_accessor :benefitCategory # 0-1 Coding
84
+ attr_accessor :benefitSubCategory # 0-1 Coding
85
+
86
+ def resourceType
87
+ 'EligibilityRequest'
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,152 @@
1
+ module FHIR
2
+ class EligibilityResponse < 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", "requestidentifier", "requestorganizationidentifier", "requestorganizationreference", "requestprovideridentifier", "requestproviderreference", "requestreference"]
14
+ METADATA = {
15
+ 'id' => {'type'=>'id', 'path'=>'EligibilityResponse.id', 'min'=>0, 'max'=>1},
16
+ 'meta' => {'type'=>'Meta', 'path'=>'EligibilityResponse.meta', 'min'=>0, 'max'=>1},
17
+ 'implicitRules' => {'type'=>'uri', 'path'=>'EligibilityResponse.implicitRules', 'min'=>0, 'max'=>1},
18
+ 'language' => {'type'=>'code', 'path'=>'EligibilityResponse.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
19
+ 'text' => {'type'=>'Narrative', 'path'=>'EligibilityResponse.text', 'min'=>0, 'max'=>1},
20
+ 'contained' => {'type'=>'Resource', 'path'=>'EligibilityResponse.contained', 'min'=>0, 'max'=>Float::INFINITY},
21
+ 'extension' => {'type'=>'Extension', 'path'=>'EligibilityResponse.extension', 'min'=>0, 'max'=>Float::INFINITY},
22
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'EligibilityResponse.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
23
+ 'identifier' => {'type'=>'Identifier', 'path'=>'EligibilityResponse.identifier', 'min'=>0, 'max'=>Float::INFINITY},
24
+ 'requestIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityResponse.request[x]', 'min'=>0, 'max'=>1},
25
+ 'requestReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/EligibilityRequest'], 'type'=>'Reference', 'path'=>'EligibilityResponse.request[x]', 'min'=>0, 'max'=>1},
26
+ 'outcome' => {'valid_codes'=>{'http://hl7.org/fhir/remittance-outcome'=>['complete', 'error']}, 'type'=>'code', 'path'=>'EligibilityResponse.outcome', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/remittance-outcome'}},
27
+ 'disposition' => {'type'=>'string', 'path'=>'EligibilityResponse.disposition', 'min'=>0, 'max'=>1},
28
+ 'ruleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'EligibilityResponse.ruleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
29
+ 'originalRuleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'EligibilityResponse.originalRuleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
30
+ 'created' => {'type'=>'dateTime', 'path'=>'EligibilityResponse.created', 'min'=>0, 'max'=>1},
31
+ 'organizationIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityResponse.organization[x]', 'min'=>0, 'max'=>1},
32
+ 'organizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'EligibilityResponse.organization[x]', 'min'=>0, 'max'=>1},
33
+ 'requestProviderIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityResponse.requestProvider[x]', 'min'=>0, 'max'=>1},
34
+ 'requestProviderReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'EligibilityResponse.requestProvider[x]', 'min'=>0, 'max'=>1},
35
+ 'requestOrganizationIdentifier' => {'type'=>'Identifier', 'path'=>'EligibilityResponse.requestOrganization[x]', 'min'=>0, 'max'=>1},
36
+ 'requestOrganizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'EligibilityResponse.requestOrganization[x]', 'min'=>0, 'max'=>1},
37
+ 'inforce' => {'type'=>'boolean', 'path'=>'EligibilityResponse.inforce', 'min'=>0, 'max'=>1},
38
+ 'contract' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Contract'], 'type'=>'Reference', 'path'=>'EligibilityResponse.contract', 'min'=>0, 'max'=>1},
39
+ 'form' => {'valid_codes'=>{'http://hl7.org/fhir/forms-codes'=>['1', '2']}, 'type'=>'Coding', 'path'=>'EligibilityResponse.form', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/forms'}},
40
+ 'benefitBalance' => {'type'=>'EligibilityResponse::Benefitbalance', 'path'=>'EligibilityResponse.benefitBalance', 'min'=>0, 'max'=>Float::INFINITY},
41
+ 'error' => {'type'=>'EligibilityResponse::Error', 'path'=>'EligibilityResponse.error', 'min'=>0, 'max'=>Float::INFINITY}
42
+ }
43
+
44
+ class Benefitbalance < FHIR::Model
45
+ include FHIR::Hashable
46
+ include FHIR::Json
47
+ include FHIR::Xml
48
+
49
+ METADATA = {
50
+ 'id' => {'type'=>'id', 'path'=>'Benefitbalance.id', 'min'=>0, 'max'=>1},
51
+ 'extension' => {'type'=>'Extension', 'path'=>'Benefitbalance.extension', 'min'=>0, 'max'=>Float::INFINITY},
52
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Benefitbalance.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
53
+ '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'}},
54
+ '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'}},
55
+ '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'}},
56
+ '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'}},
57
+ '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'}},
58
+ 'financial' => {'type'=>'EligibilityResponse::Benefitbalance::Financial', 'path'=>'Benefitbalance.financial', 'min'=>0, 'max'=>Float::INFINITY}
59
+ }
60
+
61
+ class Financial < FHIR::Model
62
+ include FHIR::Hashable
63
+ include FHIR::Json
64
+ include FHIR::Xml
65
+
66
+ MULTIPLE_TYPES = {
67
+ 'benefit' => ['unsignedInt', 'Quantity'],
68
+ 'benefitUsed' => ['unsignedInt', 'Quantity']
69
+ }
70
+ METADATA = {
71
+ 'id' => {'type'=>'id', 'path'=>'Financial.id', 'min'=>0, 'max'=>1},
72
+ 'extension' => {'type'=>'Extension', 'path'=>'Financial.extension', 'min'=>0, 'max'=>Float::INFINITY},
73
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Financial.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
74
+ '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'}},
75
+ 'benefitUnsignedInt' => {'type'=>'unsignedInt', 'path'=>'Financial.benefit[x]', 'min'=>0, 'max'=>1},
76
+ 'benefitQuantity' => {'type'=>'Quantity', 'path'=>'Financial.benefit[x]', 'min'=>0, 'max'=>1},
77
+ 'benefitUsedUnsignedInt' => {'type'=>'unsignedInt', 'path'=>'Financial.benefitUsed[x]', 'min'=>0, 'max'=>1},
78
+ 'benefitUsedQuantity' => {'type'=>'Quantity', 'path'=>'Financial.benefitUsed[x]', 'min'=>0, 'max'=>1}
79
+ }
80
+
81
+ attr_accessor :id # 0-1 id
82
+ attr_accessor :extension # 0-* [ Extension ]
83
+ attr_accessor :modifierExtension # 0-* [ Extension ]
84
+ attr_accessor :type # 1-1 Coding
85
+ attr_accessor :benefitUnsignedInt # 0-1 unsignedInt
86
+ attr_accessor :benefitQuantity # 0-1 Quantity
87
+ attr_accessor :benefitUsedUnsignedInt # 0-1 unsignedInt
88
+ attr_accessor :benefitUsedQuantity # 0-1 Quantity
89
+ end
90
+
91
+ attr_accessor :id # 0-1 id
92
+ attr_accessor :extension # 0-* [ Extension ]
93
+ attr_accessor :modifierExtension # 0-* [ Extension ]
94
+ attr_accessor :category # 1-1 Coding
95
+ attr_accessor :subCategory # 0-1 Coding
96
+ attr_accessor :network # 0-1 Coding
97
+ attr_accessor :unit # 0-1 Coding
98
+ attr_accessor :term # 0-1 Coding
99
+ attr_accessor :financial # 0-* [ EligibilityResponse::Benefitbalance::Financial ]
100
+ end
101
+
102
+ class Error < FHIR::Model
103
+ include FHIR::Hashable
104
+ include FHIR::Json
105
+ include FHIR::Xml
106
+
107
+ METADATA = {
108
+ 'id' => {'type'=>'id', 'path'=>'Error.id', 'min'=>0, 'max'=>1},
109
+ 'extension' => {'type'=>'Extension', 'path'=>'Error.extension', 'min'=>0, 'max'=>Float::INFINITY},
110
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Error.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
111
+ 'code' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication-error'=>['a001', 'a002']}, 'type'=>'Coding', 'path'=>'Error.code', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication-error'}}
112
+ }
113
+
114
+ attr_accessor :id # 0-1 id
115
+ attr_accessor :extension # 0-* [ Extension ]
116
+ attr_accessor :modifierExtension # 0-* [ Extension ]
117
+ attr_accessor :code # 1-1 Coding
118
+ end
119
+
120
+ attr_accessor :id # 0-1 id
121
+ attr_accessor :meta # 0-1 Meta
122
+ attr_accessor :implicitRules # 0-1 uri
123
+ attr_accessor :language # 0-1 code
124
+ attr_accessor :text # 0-1 Narrative
125
+ attr_accessor :contained # 0-* [ Resource ]
126
+ attr_accessor :extension # 0-* [ Extension ]
127
+ attr_accessor :modifierExtension # 0-* [ Extension ]
128
+ attr_accessor :identifier # 0-* [ Identifier ]
129
+ attr_accessor :requestIdentifier # 0-1 Identifier
130
+ attr_accessor :requestReference # 0-1 Reference(EligibilityRequest)
131
+ attr_accessor :outcome # 0-1 code
132
+ attr_accessor :disposition # 0-1 string
133
+ attr_accessor :ruleset # 0-1 Coding
134
+ attr_accessor :originalRuleset # 0-1 Coding
135
+ attr_accessor :created # 0-1 dateTime
136
+ attr_accessor :organizationIdentifier # 0-1 Identifier
137
+ attr_accessor :organizationReference # 0-1 Reference(Organization)
138
+ attr_accessor :requestProviderIdentifier # 0-1 Identifier
139
+ attr_accessor :requestProviderReference # 0-1 Reference(Practitioner)
140
+ attr_accessor :requestOrganizationIdentifier # 0-1 Identifier
141
+ attr_accessor :requestOrganizationReference # 0-1 Reference(Organization)
142
+ attr_accessor :inforce # 0-1 boolean
143
+ attr_accessor :contract # 0-1 Reference(Contract)
144
+ attr_accessor :form # 0-1 Coding
145
+ attr_accessor :benefitBalance # 0-* [ EligibilityResponse::Benefitbalance ]
146
+ attr_accessor :error # 0-* [ EligibilityResponse::Error ]
147
+
148
+ def resourceType
149
+ 'EligibilityResponse'
150
+ end
151
+ end
152
+ end