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,320 @@
1
+ module FHIR
2
+ class Contract < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ MULTIPLE_TYPES = {
8
+ 'binding' => ['Attachment', 'Reference']
9
+ }
10
+ SEARCH_PARAMS = ["agent", "authority", "domain", "identifier", "issued", "patient", "signer", "subject", "topic", "ttopic"]
11
+ METADATA = {
12
+ 'id' => {'type'=>'id', 'path'=>'Contract.id', 'min'=>0, 'max'=>1},
13
+ 'meta' => {'type'=>'Meta', 'path'=>'Contract.meta', 'min'=>0, 'max'=>1},
14
+ 'implicitRules' => {'type'=>'uri', 'path'=>'Contract.implicitRules', 'min'=>0, 'max'=>1},
15
+ 'language' => {'type'=>'code', 'path'=>'Contract.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
16
+ 'text' => {'type'=>'Narrative', 'path'=>'Contract.text', 'min'=>0, 'max'=>1},
17
+ 'contained' => {'type'=>'Resource', 'path'=>'Contract.contained', 'min'=>0, 'max'=>Float::INFINITY},
18
+ 'extension' => {'type'=>'Extension', 'path'=>'Contract.extension', 'min'=>0, 'max'=>Float::INFINITY},
19
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Contract.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
20
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Contract.identifier', 'min'=>0, 'max'=>1},
21
+ 'issued' => {'type'=>'dateTime', 'path'=>'Contract.issued', 'min'=>0, 'max'=>1},
22
+ 'applies' => {'type'=>'Period', 'path'=>'Contract.applies', 'min'=>0, 'max'=>1},
23
+ 'subject' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Contract.subject', 'min'=>0, 'max'=>Float::INFINITY},
24
+ 'topic' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Contract.topic', 'min'=>0, 'max'=>Float::INFINITY},
25
+ 'authority' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Contract.authority', 'min'=>0, 'max'=>Float::INFINITY},
26
+ 'domain' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Contract.domain', 'min'=>0, 'max'=>Float::INFINITY},
27
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/contracttypecodes'=>['privacy', 'disclosure']}, 'type'=>'CodeableConcept', 'path'=>'Contract.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-type'}},
28
+ 'subType' => {'valid_codes'=>{'http://hl7.org/fhir/contractsubtypecodes'=>['disclosure-CA', 'disclosure-US']}, 'type'=>'CodeableConcept', 'path'=>'Contract.subType', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-subtype'}},
29
+ 'action' => {'valid_codes'=>{'http://www.hl7.org/fhir/contractaction'=>['action-a', 'action-b']}, 'type'=>'CodeableConcept', 'path'=>'Contract.action', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-action'}},
30
+ 'actionReason' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActReason'=>['PurposeOfUse', 'HMARKT', 'HOPERAT', 'DONAT', 'FRAUD', 'GOV', 'HACCRED', 'HCOMPL', 'HDECD', 'HDIRECT', 'HLEGAL', 'HOUTCOMS', 'HPRGRP', 'HQUALIMP', 'HSYSADMIN', 'MEMADMIN', 'PATADMIN', 'PATSFTY', 'PERFMSR', 'RECORDMGT', 'TRAIN', 'HPAYMT', 'CLMATTCH', 'COVAUTH', 'COVERAGE', 'ELIGDTRM', 'ELIGVER', 'ENROLLM', 'REMITADV', 'HRESCH', 'CLINTRCH', 'PATRQT', 'FAMRQT', 'PWATRNY', 'SUPNWK', 'PUBHLTH', 'DISASTER', 'THREAT', 'TREAT', 'CAREMGT', 'CLINTRL', 'ETREAT', 'POPHLTH']}, 'type'=>'CodeableConcept', 'path'=>'Contract.actionReason', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-PurposeOfUse'}},
31
+ 'agent' => {'type'=>'Contract::Agent', 'path'=>'Contract.agent', 'min'=>0, 'max'=>Float::INFINITY},
32
+ 'signer' => {'type'=>'Contract::Signer', 'path'=>'Contract.signer', 'min'=>0, 'max'=>Float::INFINITY},
33
+ 'valuedItem' => {'type'=>'Contract::Valueditem', 'path'=>'Contract.valuedItem', 'min'=>0, 'max'=>Float::INFINITY},
34
+ 'term' => {'type'=>'Contract::Term', 'path'=>'Contract.term', 'min'=>0, 'max'=>Float::INFINITY},
35
+ 'bindingAttachment' => {'type'=>'Attachment', 'path'=>'Contract.binding[x]', 'min'=>0, 'max'=>1},
36
+ 'bindingReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Composition', 'http://hl7.org/fhir/StructureDefinition/DocumentReference', 'http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse'], 'type'=>'Reference', 'path'=>'Contract.binding[x]', 'min'=>0, 'max'=>1},
37
+ 'friendly' => {'type'=>'Contract::Friendly', 'path'=>'Contract.friendly', 'min'=>0, 'max'=>Float::INFINITY},
38
+ 'legal' => {'type'=>'Contract::Legal', 'path'=>'Contract.legal', 'min'=>0, 'max'=>Float::INFINITY},
39
+ 'rule' => {'type'=>'Contract::Rule', 'path'=>'Contract.rule', 'min'=>0, 'max'=>Float::INFINITY}
40
+ }
41
+
42
+ class Agent < FHIR::Model
43
+ include FHIR::Hashable
44
+ include FHIR::Json
45
+ include FHIR::Xml
46
+
47
+ METADATA = {
48
+ 'id' => {'type'=>'id', 'path'=>'Agent.id', 'min'=>0, 'max'=>1},
49
+ 'extension' => {'type'=>'Extension', 'path'=>'Agent.extension', 'min'=>0, 'max'=>Float::INFINITY},
50
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Agent.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
51
+ 'actor' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Contract', 'http://hl7.org/fhir/StructureDefinition/Device', 'http://hl7.org/fhir/StructureDefinition/Group', 'http://hl7.org/fhir/StructureDefinition/Location', 'http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson', 'http://hl7.org/fhir/StructureDefinition/Substance'], 'type'=>'Reference', 'path'=>'Agent.actor', 'min'=>1, 'max'=>1},
52
+ 'role' => {'valid_codes'=>{'http://www.hl7.org/fhir/contractactorrole'=>['practitioner', 'patient']}, 'type'=>'CodeableConcept', 'path'=>'Agent.role', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-actorrole'}}
53
+ }
54
+
55
+ attr_accessor :id # 0-1 id
56
+ attr_accessor :extension # 0-* [ Extension ]
57
+ attr_accessor :modifierExtension # 0-* [ Extension ]
58
+ attr_accessor :actor # 1-1 Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)
59
+ attr_accessor :role # 0-* [ CodeableConcept ]
60
+ end
61
+
62
+ class Signer < FHIR::Model
63
+ include FHIR::Hashable
64
+ include FHIR::Json
65
+ include FHIR::Xml
66
+
67
+ METADATA = {
68
+ 'id' => {'type'=>'id', 'path'=>'Signer.id', 'min'=>0, 'max'=>1},
69
+ 'extension' => {'type'=>'Extension', 'path'=>'Signer.extension', 'min'=>0, 'max'=>Float::INFINITY},
70
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Signer.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
71
+ 'type' => {'valid_codes'=>{'http://www.hl7.org/fhir/contractsignertypecodes'=>['AMENDER', 'AUTHN', 'AUT', 'AFFL', 'AGNT', 'ASSIGNED', 'CIT', 'CLAIMANT', 'COAUTH', 'CONSENTER', 'CONSWIT', 'CONT', 'COPART', 'COVPTY', 'DELEGATEE', 'delegator', 'DEPEND', 'DPOWATT', 'EMGCON', 'EVTWIT', 'EXCEST', 'GRANTEE', 'GRANTOR', 'GUAR', 'GUARD', 'GUADLTM', 'INF', 'INTPRT', 'INSBJ', 'HPOWATT', 'HPROV', 'LEGAUTHN', 'NMDINS', 'NOK', 'NOTARY', 'PAT', 'POWATT', 'PRIMAUTH', 'PRIRECIP', 'RECIP', 'RESPRSN', 'REVIEWER', 'TRANS', 'SOURCE', 'SPOWATT', 'VALID', 'VERF', 'WIT']}, 'type'=>'Coding', 'path'=>'Signer.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'preferred', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-signer-type'}},
72
+ 'party' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson'], 'type'=>'Reference', 'path'=>'Signer.party', 'min'=>1, 'max'=>1},
73
+ 'signature' => {'type'=>'Signature', 'path'=>'Signer.signature', 'min'=>1, 'max'=>Float::INFINITY}
74
+ }
75
+
76
+ attr_accessor :id # 0-1 id
77
+ attr_accessor :extension # 0-* [ Extension ]
78
+ attr_accessor :modifierExtension # 0-* [ Extension ]
79
+ attr_accessor :type # 1-1 Coding
80
+ attr_accessor :party # 1-1 Reference(Organization|Patient|Practitioner|RelatedPerson)
81
+ attr_accessor :signature # 1-* [ Signature ]
82
+ end
83
+
84
+ class Valueditem < FHIR::Model
85
+ include FHIR::Hashable
86
+ include FHIR::Json
87
+ include FHIR::Xml
88
+
89
+ MULTIPLE_TYPES = {
90
+ 'entity' => ['CodeableConcept', 'Reference']
91
+ }
92
+ METADATA = {
93
+ 'id' => {'type'=>'id', 'path'=>'Valueditem.id', 'min'=>0, 'max'=>1},
94
+ 'extension' => {'type'=>'Extension', 'path'=>'Valueditem.extension', 'min'=>0, 'max'=>Float::INFINITY},
95
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Valueditem.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
96
+ 'entityCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'Valueditem.entity[x]', 'min'=>0, 'max'=>1},
97
+ 'entityReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Valueditem.entity[x]', 'min'=>0, 'max'=>1},
98
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Valueditem.identifier', 'min'=>0, 'max'=>1},
99
+ 'effectiveTime' => {'type'=>'dateTime', 'path'=>'Valueditem.effectiveTime', 'min'=>0, 'max'=>1},
100
+ 'quantity' => {'type'=>'Quantity', 'path'=>'Valueditem.quantity', 'min'=>0, 'max'=>1},
101
+ 'unitPrice' => {'type'=>'Quantity', 'path'=>'Valueditem.unitPrice', 'min'=>0, 'max'=>1},
102
+ 'factor' => {'type'=>'decimal', 'path'=>'Valueditem.factor', 'min'=>0, 'max'=>1},
103
+ 'points' => {'type'=>'decimal', 'path'=>'Valueditem.points', 'min'=>0, 'max'=>1},
104
+ 'net' => {'type'=>'Quantity', 'path'=>'Valueditem.net', 'min'=>0, 'max'=>1}
105
+ }
106
+
107
+ attr_accessor :id # 0-1 id
108
+ attr_accessor :extension # 0-* [ Extension ]
109
+ attr_accessor :modifierExtension # 0-* [ Extension ]
110
+ attr_accessor :entityCodeableConcept # 0-1 CodeableConcept
111
+ attr_accessor :entityReference # 0-1 Reference(Resource)
112
+ attr_accessor :identifier # 0-1 Identifier
113
+ attr_accessor :effectiveTime # 0-1 dateTime
114
+ attr_accessor :quantity # 0-1 Quantity
115
+ attr_accessor :unitPrice # 0-1 Quantity
116
+ attr_accessor :factor # 0-1 decimal
117
+ attr_accessor :points # 0-1 decimal
118
+ attr_accessor :net # 0-1 Quantity
119
+ end
120
+
121
+ class Term < FHIR::Model
122
+ include FHIR::Hashable
123
+ include FHIR::Json
124
+ include FHIR::Xml
125
+
126
+ METADATA = {
127
+ 'id' => {'type'=>'id', 'path'=>'Term.id', 'min'=>0, 'max'=>1},
128
+ 'extension' => {'type'=>'Extension', 'path'=>'Term.extension', 'min'=>0, 'max'=>Float::INFINITY},
129
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Term.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
130
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Term.identifier', 'min'=>0, 'max'=>1},
131
+ 'issued' => {'type'=>'dateTime', 'path'=>'Term.issued', 'min'=>0, 'max'=>1},
132
+ 'applies' => {'type'=>'Period', 'path'=>'Term.applies', 'min'=>0, 'max'=>1},
133
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/contracttermtypecodes'=>['OralHealth', 'Vision']}, 'type'=>'CodeableConcept', 'path'=>'Term.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-term-type'}},
134
+ 'subType' => {'valid_codes'=>{'http://hl7.org/fhir/contracttermsubtypecodes'=>['OralHealth-Basic', 'OralHealth-Major', 'OralHealth-Orthodontic']}, 'type'=>'CodeableConcept', 'path'=>'Term.subType', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-term-subtype'}},
135
+ 'topic' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Term.topic', 'min'=>0, 'max'=>Float::INFINITY},
136
+ 'action' => {'valid_codes'=>{'http://www.hl7.org/fhir/contractaction'=>['action-a', 'action-b']}, 'type'=>'CodeableConcept', 'path'=>'Term.action', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-action'}},
137
+ 'actionReason' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActReason'=>['PurposeOfUse', 'HMARKT', 'HOPERAT', 'DONAT', 'FRAUD', 'GOV', 'HACCRED', 'HCOMPL', 'HDECD', 'HDIRECT', 'HLEGAL', 'HOUTCOMS', 'HPRGRP', 'HQUALIMP', 'HSYSADMIN', 'MEMADMIN', 'PATADMIN', 'PATSFTY', 'PERFMSR', 'RECORDMGT', 'TRAIN', 'HPAYMT', 'CLMATTCH', 'COVAUTH', 'COVERAGE', 'ELIGDTRM', 'ELIGVER', 'ENROLLM', 'REMITADV', 'HRESCH', 'CLINTRCH', 'PATRQT', 'FAMRQT', 'PWATRNY', 'SUPNWK', 'PUBHLTH', 'DISASTER', 'THREAT', 'TREAT', 'CAREMGT', 'CLINTRL', 'ETREAT', 'POPHLTH']}, 'type'=>'CodeableConcept', 'path'=>'Term.actionReason', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-PurposeOfUse'}},
138
+ 'agent' => {'type'=>'Contract::Term::Agent', 'path'=>'Term.agent', 'min'=>0, 'max'=>Float::INFINITY},
139
+ 'text' => {'type'=>'string', 'path'=>'Term.text', 'min'=>0, 'max'=>1},
140
+ 'valuedItem' => {'type'=>'Contract::Term::Valueditem', 'path'=>'Term.valuedItem', 'min'=>0, 'max'=>Float::INFINITY},
141
+ 'group' => {'type'=>'Contract::Term', 'path'=>'Term.group', 'min'=>0, 'max'=>Float::INFINITY}
142
+ }
143
+
144
+ class Agent < FHIR::Model
145
+ include FHIR::Hashable
146
+ include FHIR::Json
147
+ include FHIR::Xml
148
+
149
+ METADATA = {
150
+ 'id' => {'type'=>'id', 'path'=>'Agent.id', 'min'=>0, 'max'=>1},
151
+ 'extension' => {'type'=>'Extension', 'path'=>'Agent.extension', 'min'=>0, 'max'=>Float::INFINITY},
152
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Agent.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
153
+ 'actor' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Contract', 'http://hl7.org/fhir/StructureDefinition/Device', 'http://hl7.org/fhir/StructureDefinition/Group', 'http://hl7.org/fhir/StructureDefinition/Location', 'http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson', 'http://hl7.org/fhir/StructureDefinition/Substance'], 'type'=>'Reference', 'path'=>'Agent.actor', 'min'=>1, 'max'=>1},
154
+ 'role' => {'valid_codes'=>{'http://www.hl7.org/fhir/contractactorrole'=>['practitioner', 'patient']}, 'type'=>'CodeableConcept', 'path'=>'Agent.role', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-actorrole'}}
155
+ }
156
+
157
+ attr_accessor :id # 0-1 id
158
+ attr_accessor :extension # 0-* [ Extension ]
159
+ attr_accessor :modifierExtension # 0-* [ Extension ]
160
+ attr_accessor :actor # 1-1 Reference(Contract|Device|Group|Location|Organization|Patient|Practitioner|RelatedPerson|Substance)
161
+ attr_accessor :role # 0-* [ CodeableConcept ]
162
+ end
163
+
164
+ class Valueditem < FHIR::Model
165
+ include FHIR::Hashable
166
+ include FHIR::Json
167
+ include FHIR::Xml
168
+
169
+ MULTIPLE_TYPES = {
170
+ 'entity' => ['CodeableConcept', 'Reference']
171
+ }
172
+ METADATA = {
173
+ 'id' => {'type'=>'id', 'path'=>'Valueditem.id', 'min'=>0, 'max'=>1},
174
+ 'extension' => {'type'=>'Extension', 'path'=>'Valueditem.extension', 'min'=>0, 'max'=>Float::INFINITY},
175
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Valueditem.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
176
+ 'entityCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'Valueditem.entity[x]', 'min'=>0, 'max'=>1},
177
+ 'entityReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Valueditem.entity[x]', 'min'=>0, 'max'=>1},
178
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Valueditem.identifier', 'min'=>0, 'max'=>1},
179
+ 'effectiveTime' => {'type'=>'dateTime', 'path'=>'Valueditem.effectiveTime', 'min'=>0, 'max'=>1},
180
+ 'quantity' => {'type'=>'Quantity', 'path'=>'Valueditem.quantity', 'min'=>0, 'max'=>1},
181
+ 'unitPrice' => {'type'=>'Quantity', 'path'=>'Valueditem.unitPrice', 'min'=>0, 'max'=>1},
182
+ 'factor' => {'type'=>'decimal', 'path'=>'Valueditem.factor', 'min'=>0, 'max'=>1},
183
+ 'points' => {'type'=>'decimal', 'path'=>'Valueditem.points', 'min'=>0, 'max'=>1},
184
+ 'net' => {'type'=>'Quantity', 'path'=>'Valueditem.net', 'min'=>0, 'max'=>1}
185
+ }
186
+
187
+ attr_accessor :id # 0-1 id
188
+ attr_accessor :extension # 0-* [ Extension ]
189
+ attr_accessor :modifierExtension # 0-* [ Extension ]
190
+ attr_accessor :entityCodeableConcept # 0-1 CodeableConcept
191
+ attr_accessor :entityReference # 0-1 Reference(Resource)
192
+ attr_accessor :identifier # 0-1 Identifier
193
+ attr_accessor :effectiveTime # 0-1 dateTime
194
+ attr_accessor :quantity # 0-1 Quantity
195
+ attr_accessor :unitPrice # 0-1 Quantity
196
+ attr_accessor :factor # 0-1 decimal
197
+ attr_accessor :points # 0-1 decimal
198
+ attr_accessor :net # 0-1 Quantity
199
+ end
200
+
201
+ attr_accessor :id # 0-1 id
202
+ attr_accessor :extension # 0-* [ Extension ]
203
+ attr_accessor :modifierExtension # 0-* [ Extension ]
204
+ attr_accessor :identifier # 0-1 Identifier
205
+ attr_accessor :issued # 0-1 dateTime
206
+ attr_accessor :applies # 0-1 Period
207
+ attr_accessor :type # 0-1 CodeableConcept
208
+ attr_accessor :subType # 0-1 CodeableConcept
209
+ attr_accessor :topic # 0-* [ Reference(Resource) ]
210
+ attr_accessor :action # 0-* [ CodeableConcept ]
211
+ attr_accessor :actionReason # 0-* [ CodeableConcept ]
212
+ attr_accessor :agent # 0-* [ Contract::Term::Agent ]
213
+ attr_accessor :text # 0-1 string
214
+ attr_accessor :valuedItem # 0-* [ Contract::Term::Valueditem ]
215
+ attr_accessor :group # 0-* [ Contract::Term ]
216
+ end
217
+
218
+ class Friendly < FHIR::Model
219
+ include FHIR::Hashable
220
+ include FHIR::Json
221
+ include FHIR::Xml
222
+
223
+ MULTIPLE_TYPES = {
224
+ 'content' => ['Attachment', 'Reference']
225
+ }
226
+ METADATA = {
227
+ 'id' => {'type'=>'id', 'path'=>'Friendly.id', 'min'=>0, 'max'=>1},
228
+ 'extension' => {'type'=>'Extension', 'path'=>'Friendly.extension', 'min'=>0, 'max'=>Float::INFINITY},
229
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Friendly.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
230
+ 'contentAttachment' => {'type'=>'Attachment', 'path'=>'Friendly.content[x]', 'min'=>1, 'max'=>1},
231
+ 'contentReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Composition', 'http://hl7.org/fhir/StructureDefinition/DocumentReference', 'http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse'], 'type'=>'Reference', 'path'=>'Friendly.content[x]', 'min'=>1, 'max'=>1}
232
+ }
233
+
234
+ attr_accessor :id # 0-1 id
235
+ attr_accessor :extension # 0-* [ Extension ]
236
+ attr_accessor :modifierExtension # 0-* [ Extension ]
237
+ attr_accessor :contentAttachment # 1-1 Attachment
238
+ attr_accessor :contentReference # 1-1 Reference(Composition|DocumentReference|QuestionnaireResponse)
239
+ end
240
+
241
+ class Legal < FHIR::Model
242
+ include FHIR::Hashable
243
+ include FHIR::Json
244
+ include FHIR::Xml
245
+
246
+ MULTIPLE_TYPES = {
247
+ 'content' => ['Attachment', 'Reference']
248
+ }
249
+ METADATA = {
250
+ 'id' => {'type'=>'id', 'path'=>'Legal.id', 'min'=>0, 'max'=>1},
251
+ 'extension' => {'type'=>'Extension', 'path'=>'Legal.extension', 'min'=>0, 'max'=>Float::INFINITY},
252
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Legal.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
253
+ 'contentAttachment' => {'type'=>'Attachment', 'path'=>'Legal.content[x]', 'min'=>1, 'max'=>1},
254
+ 'contentReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Composition', 'http://hl7.org/fhir/StructureDefinition/DocumentReference', 'http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse'], 'type'=>'Reference', 'path'=>'Legal.content[x]', 'min'=>1, 'max'=>1}
255
+ }
256
+
257
+ attr_accessor :id # 0-1 id
258
+ attr_accessor :extension # 0-* [ Extension ]
259
+ attr_accessor :modifierExtension # 0-* [ Extension ]
260
+ attr_accessor :contentAttachment # 1-1 Attachment
261
+ attr_accessor :contentReference # 1-1 Reference(Composition|DocumentReference|QuestionnaireResponse)
262
+ end
263
+
264
+ class Rule < FHIR::Model
265
+ include FHIR::Hashable
266
+ include FHIR::Json
267
+ include FHIR::Xml
268
+
269
+ MULTIPLE_TYPES = {
270
+ 'content' => ['Attachment', 'Reference']
271
+ }
272
+ METADATA = {
273
+ 'id' => {'type'=>'id', 'path'=>'Rule.id', 'min'=>0, 'max'=>1},
274
+ 'extension' => {'type'=>'Extension', 'path'=>'Rule.extension', 'min'=>0, 'max'=>Float::INFINITY},
275
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Rule.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
276
+ 'contentAttachment' => {'type'=>'Attachment', 'path'=>'Rule.content[x]', 'min'=>1, 'max'=>1},
277
+ 'contentReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/DocumentReference'], 'type'=>'Reference', 'path'=>'Rule.content[x]', 'min'=>1, 'max'=>1}
278
+ }
279
+
280
+ attr_accessor :id # 0-1 id
281
+ attr_accessor :extension # 0-* [ Extension ]
282
+ attr_accessor :modifierExtension # 0-* [ Extension ]
283
+ attr_accessor :contentAttachment # 1-1 Attachment
284
+ attr_accessor :contentReference # 1-1 Reference(DocumentReference)
285
+ end
286
+
287
+ attr_accessor :id # 0-1 id
288
+ attr_accessor :meta # 0-1 Meta
289
+ attr_accessor :implicitRules # 0-1 uri
290
+ attr_accessor :language # 0-1 code
291
+ attr_accessor :text # 0-1 Narrative
292
+ attr_accessor :contained # 0-* [ Resource ]
293
+ attr_accessor :extension # 0-* [ Extension ]
294
+ attr_accessor :modifierExtension # 0-* [ Extension ]
295
+ attr_accessor :identifier # 0-1 Identifier
296
+ attr_accessor :issued # 0-1 dateTime
297
+ attr_accessor :applies # 0-1 Period
298
+ attr_accessor :subject # 0-* [ Reference(Resource) ]
299
+ attr_accessor :topic # 0-* [ Reference(Resource) ]
300
+ attr_accessor :authority # 0-* [ Reference(Organization) ]
301
+ attr_accessor :domain # 0-* [ Reference(Location) ]
302
+ attr_accessor :type # 0-1 CodeableConcept
303
+ attr_accessor :subType # 0-* [ CodeableConcept ]
304
+ attr_accessor :action # 0-* [ CodeableConcept ]
305
+ attr_accessor :actionReason # 0-* [ CodeableConcept ]
306
+ attr_accessor :agent # 0-* [ Contract::Agent ]
307
+ attr_accessor :signer # 0-* [ Contract::Signer ]
308
+ attr_accessor :valuedItem # 0-* [ Contract::Valueditem ]
309
+ attr_accessor :term # 0-* [ Contract::Term ]
310
+ attr_accessor :bindingAttachment # 0-1 Attachment
311
+ attr_accessor :bindingReference # 0-1 Reference(Composition|DocumentReference|QuestionnaireResponse)
312
+ attr_accessor :friendly # 0-* [ Contract::Friendly ]
313
+ attr_accessor :legal # 0-* [ Contract::Legal ]
314
+ attr_accessor :rule # 0-* [ Contract::Rule ]
315
+
316
+ def resourceType
317
+ 'Contract'
318
+ end
319
+ end
320
+ end
@@ -0,0 +1,77 @@
1
+ module FHIR
2
+ class Coverage < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ MULTIPLE_TYPES = {
8
+ 'issuer' => ['Identifier', 'Reference'],
9
+ 'planholder' => ['Identifier', 'Reference'],
10
+ 'beneficiary' => ['Identifier', 'Reference']
11
+ }
12
+ SEARCH_PARAMS = ["beneficiaryidentifier", "beneficiaryreference", "dependent", "group", "identifier", "issueridentifier", "issuerreference", "plan", "planholderidentifier", "planholderreference", "sequence", "subplan", "type"]
13
+ METADATA = {
14
+ 'id' => {'type'=>'id', 'path'=>'Coverage.id', 'min'=>0, 'max'=>1},
15
+ 'meta' => {'type'=>'Meta', 'path'=>'Coverage.meta', 'min'=>0, 'max'=>1},
16
+ 'implicitRules' => {'type'=>'uri', 'path'=>'Coverage.implicitRules', 'min'=>0, 'max'=>1},
17
+ 'language' => {'type'=>'code', 'path'=>'Coverage.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
18
+ 'text' => {'type'=>'Narrative', 'path'=>'Coverage.text', 'min'=>0, 'max'=>1},
19
+ 'contained' => {'type'=>'Resource', 'path'=>'Coverage.contained', 'min'=>0, 'max'=>Float::INFINITY},
20
+ 'extension' => {'type'=>'Extension', 'path'=>'Coverage.extension', 'min'=>0, 'max'=>Float::INFINITY},
21
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Coverage.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
22
+ 'issuerIdentifier' => {'type'=>'Identifier', 'path'=>'Coverage.issuer[x]', 'min'=>1, 'max'=>1},
23
+ 'issuerReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Coverage.issuer[x]', 'min'=>1, 'max'=>1},
24
+ 'bin' => {'type'=>'string', 'path'=>'Coverage.bin', 'min'=>0, 'max'=>1},
25
+ 'period' => {'type'=>'Period', 'path'=>'Coverage.period', 'min'=>0, 'max'=>1},
26
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActCode'=>['_ActCoverageTypeCode', '_ActInsurancePolicyCode', 'EHCPOL', 'HSAPOL', 'AUTOPOL', 'COL', 'UNINSMOT', 'PUBLICPOL', 'DENTPRG', 'DISEASEPRG', 'CANPRG', 'ENDRENAL', 'HIVAIDS', 'MANDPOL', 'MENTPRG', 'SAFNET', 'SUBPRG', 'SUBSIDIZ', 'SUBSIDMC', 'SUBSUPP', 'WCBPOL', '_ActInsuranceTypeCode', '_ActHealthInsuranceTypeCode', 'DENTAL', 'DISEASE', 'DRUGPOL', 'HIP', 'LTC', 'MCPOL', 'POS', 'HMO', 'PPO', 'MENTPOL', 'SUBPOL', 'VISPOL', 'DIS', 'EWB', 'FLEXP', 'LIFE', 'ANNU', 'TLIFE', 'ULIFE', 'PNC', 'REI', 'SURPL', 'UMBRL', '_ActProgramTypeCode', 'CHAR', 'CRIME', 'EAP', 'GOVEMP', 'HIRISK', 'IND', 'MILITARY', 'RETIRE', 'SOCIAL', 'VET']}, 'type'=>'Coding', 'path'=>'Coverage.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-ActCoverageTypeCode'}},
27
+ 'planholderIdentifier' => {'type'=>'Identifier', 'path'=>'Coverage.planholder[x]', 'min'=>1, 'max'=>1},
28
+ 'planholderReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Coverage.planholder[x]', 'min'=>1, 'max'=>1},
29
+ 'beneficiaryIdentifier' => {'type'=>'Identifier', 'path'=>'Coverage.beneficiary[x]', 'min'=>1, 'max'=>1},
30
+ 'beneficiaryReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'Coverage.beneficiary[x]', 'min'=>1, 'max'=>1},
31
+ 'relationship' => {'valid_codes'=>{'http://hl7.org/fhir/relationship'=>['1', '2', '3', '4', '5']}, 'type'=>'Coding', 'path'=>'Coverage.relationship', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/relationship'}},
32
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Coverage.identifier', 'min'=>0, 'max'=>Float::INFINITY},
33
+ 'group' => {'type'=>'string', 'path'=>'Coverage.group', 'min'=>0, 'max'=>1},
34
+ 'plan' => {'type'=>'string', 'path'=>'Coverage.plan', 'min'=>0, 'max'=>1},
35
+ 'subPlan' => {'type'=>'string', 'path'=>'Coverage.subPlan', 'min'=>0, 'max'=>1},
36
+ 'dependent' => {'type'=>'positiveInt', 'path'=>'Coverage.dependent', 'min'=>0, 'max'=>1},
37
+ 'sequence' => {'type'=>'positiveInt', 'path'=>'Coverage.sequence', 'min'=>0, 'max'=>1},
38
+ 'exception' => {'valid_codes'=>{'http://hl7.org/fhir/coverage-exception'=>['student', 'disabled']}, 'type'=>'Coding', 'path'=>'Coverage.exception', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/coverage-exception'}},
39
+ 'school' => {'type'=>'string', 'path'=>'Coverage.school', 'min'=>0, 'max'=>1},
40
+ 'network' => {'type'=>'string', 'path'=>'Coverage.network', 'min'=>0, 'max'=>1},
41
+ 'contract' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Contract'], 'type'=>'Reference', 'path'=>'Coverage.contract', 'min'=>0, 'max'=>Float::INFINITY}
42
+ }
43
+
44
+ attr_accessor :id # 0-1 id
45
+ attr_accessor :meta # 0-1 Meta
46
+ attr_accessor :implicitRules # 0-1 uri
47
+ attr_accessor :language # 0-1 code
48
+ attr_accessor :text # 0-1 Narrative
49
+ attr_accessor :contained # 0-* [ Resource ]
50
+ attr_accessor :extension # 0-* [ Extension ]
51
+ attr_accessor :modifierExtension # 0-* [ Extension ]
52
+ attr_accessor :issuerIdentifier # 1-1 Identifier
53
+ attr_accessor :issuerReference # 1-1 Reference(Organization)
54
+ attr_accessor :bin # 0-1 string
55
+ attr_accessor :period # 0-1 Period
56
+ attr_accessor :type # 0-1 Coding
57
+ attr_accessor :planholderIdentifier # 1-1 Identifier
58
+ attr_accessor :planholderReference # 1-1 Reference(Patient|Organization)
59
+ attr_accessor :beneficiaryIdentifier # 1-1 Identifier
60
+ attr_accessor :beneficiaryReference # 1-1 Reference(Patient)
61
+ attr_accessor :relationship # 1-1 Coding
62
+ attr_accessor :identifier # 0-* [ Identifier ]
63
+ attr_accessor :group # 0-1 string
64
+ attr_accessor :plan # 0-1 string
65
+ attr_accessor :subPlan # 0-1 string
66
+ attr_accessor :dependent # 0-1 positiveInt
67
+ attr_accessor :sequence # 0-1 positiveInt
68
+ attr_accessor :exception # 0-* [ Coding ]
69
+ attr_accessor :school # 0-1 string
70
+ attr_accessor :network # 0-1 string
71
+ attr_accessor :contract # 0-* [ Reference(Contract) ]
72
+
73
+ def resourceType
74
+ 'Coverage'
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,104 @@
1
+ module FHIR
2
+ class DataElement < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["code", "context", "date", "description", "identifier", "name", "publisher", "status", "stringency", "url", "version"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'DataElement.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'DataElement.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'DataElement.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'DataElement.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'DataElement.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'DataElement.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'DataElement.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'DataElement.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'url' => {'type'=>'uri', 'path'=>'DataElement.url', 'min'=>0, 'max'=>1},
18
+ 'identifier' => {'type'=>'Identifier', 'path'=>'DataElement.identifier', 'min'=>0, 'max'=>Float::INFINITY},
19
+ 'version' => {'type'=>'string', 'path'=>'DataElement.version', 'min'=>0, 'max'=>1},
20
+ 'status' => {'valid_codes'=>{'http://hl7.org/fhir/conformance-resource-status'=>['draft', 'active', 'retired']}, 'type'=>'code', 'path'=>'DataElement.status', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/conformance-resource-status'}},
21
+ 'experimental' => {'type'=>'boolean', 'path'=>'DataElement.experimental', 'min'=>0, 'max'=>1},
22
+ 'publisher' => {'type'=>'string', 'path'=>'DataElement.publisher', 'min'=>0, 'max'=>1},
23
+ 'date' => {'type'=>'dateTime', 'path'=>'DataElement.date', 'min'=>0, 'max'=>1},
24
+ 'name' => {'type'=>'string', 'path'=>'DataElement.name', 'min'=>0, 'max'=>1},
25
+ 'contact' => {'type'=>'DataElement::Contact', 'path'=>'DataElement.contact', 'min'=>0, 'max'=>Float::INFINITY},
26
+ 'useContext' => {'type'=>'CodeableConcept', 'path'=>'DataElement.useContext', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/use-context'}},
27
+ 'copyright' => {'type'=>'string', 'path'=>'DataElement.copyright', 'min'=>0, 'max'=>1},
28
+ 'stringency' => {'valid_codes'=>{'http://hl7.org/fhir/dataelement-stringency'=>['comparable', 'fully-specified', 'equivalent', 'convertable', 'scaleable', 'flexible']}, 'type'=>'code', 'path'=>'DataElement.stringency', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/dataelement-stringency'}},
29
+ 'mapping' => {'type'=>'DataElement::Mapping', 'path'=>'DataElement.mapping', 'min'=>0, 'max'=>Float::INFINITY},
30
+ 'element' => {'type'=>'ElementDefinition', 'path'=>'DataElement.element', 'min'=>1, 'max'=>Float::INFINITY}
31
+ }
32
+
33
+ class Contact < FHIR::Model
34
+ include FHIR::Hashable
35
+ include FHIR::Json
36
+ include FHIR::Xml
37
+
38
+ METADATA = {
39
+ 'id' => {'type'=>'id', 'path'=>'Contact.id', 'min'=>0, 'max'=>1},
40
+ 'extension' => {'type'=>'Extension', 'path'=>'Contact.extension', 'min'=>0, 'max'=>Float::INFINITY},
41
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Contact.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
42
+ 'name' => {'type'=>'string', 'path'=>'Contact.name', 'min'=>0, 'max'=>1},
43
+ 'telecom' => {'type'=>'ContactPoint', 'path'=>'Contact.telecom', 'min'=>0, 'max'=>Float::INFINITY}
44
+ }
45
+
46
+ attr_accessor :id # 0-1 id
47
+ attr_accessor :extension # 0-* [ Extension ]
48
+ attr_accessor :modifierExtension # 0-* [ Extension ]
49
+ attr_accessor :name # 0-1 string
50
+ attr_accessor :telecom # 0-* [ ContactPoint ]
51
+ end
52
+
53
+ class Mapping < FHIR::Model
54
+ include FHIR::Hashable
55
+ include FHIR::Json
56
+ include FHIR::Xml
57
+
58
+ METADATA = {
59
+ 'id' => {'type'=>'id', 'path'=>'Mapping.id', 'min'=>0, 'max'=>1},
60
+ 'extension' => {'type'=>'Extension', 'path'=>'Mapping.extension', 'min'=>0, 'max'=>Float::INFINITY},
61
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Mapping.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
62
+ 'identity' => {'type'=>'id', 'path'=>'Mapping.identity', 'min'=>1, 'max'=>1},
63
+ 'uri' => {'type'=>'uri', 'path'=>'Mapping.uri', 'min'=>0, 'max'=>1},
64
+ 'name' => {'type'=>'string', 'path'=>'Mapping.name', 'min'=>0, 'max'=>1},
65
+ 'comment' => {'type'=>'string', 'path'=>'Mapping.comment', 'min'=>0, 'max'=>1}
66
+ }
67
+
68
+ attr_accessor :id # 0-1 id
69
+ attr_accessor :extension # 0-* [ Extension ]
70
+ attr_accessor :modifierExtension # 0-* [ Extension ]
71
+ attr_accessor :identity # 1-1 id
72
+ attr_accessor :uri # 0-1 uri
73
+ attr_accessor :name # 0-1 string
74
+ attr_accessor :comment # 0-1 string
75
+ end
76
+
77
+ attr_accessor :id # 0-1 id
78
+ attr_accessor :meta # 0-1 Meta
79
+ attr_accessor :implicitRules # 0-1 uri
80
+ attr_accessor :language # 0-1 code
81
+ attr_accessor :text # 0-1 Narrative
82
+ attr_accessor :contained # 0-* [ Resource ]
83
+ attr_accessor :extension # 0-* [ Extension ]
84
+ attr_accessor :modifierExtension # 0-* [ Extension ]
85
+ attr_accessor :url # 0-1 uri
86
+ attr_accessor :identifier # 0-* [ Identifier ]
87
+ attr_accessor :version # 0-1 string
88
+ attr_accessor :status # 1-1 code
89
+ attr_accessor :experimental # 0-1 boolean
90
+ attr_accessor :publisher # 0-1 string
91
+ attr_accessor :date # 0-1 dateTime
92
+ attr_accessor :name # 0-1 string
93
+ attr_accessor :contact # 0-* [ DataElement::Contact ]
94
+ attr_accessor :useContext # 0-* [ CodeableConcept ]
95
+ attr_accessor :copyright # 0-1 string
96
+ attr_accessor :stringency # 0-1 code
97
+ attr_accessor :mapping # 0-* [ DataElement::Mapping ]
98
+ attr_accessor :element # 1-* [ ElementDefinition ]
99
+
100
+ def resourceType
101
+ 'DataElement'
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,42 @@
1
+ module FHIR
2
+ class DecisionSupportRule < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["description", "identifier", "status", "title", "topic", "version"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'DecisionSupportRule.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'DecisionSupportRule.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'DecisionSupportRule.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'DecisionSupportRule.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'DecisionSupportRule.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'DecisionSupportRule.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'DecisionSupportRule.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'DecisionSupportRule.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'moduleMetadata' => {'type'=>'ModuleMetadata', 'path'=>'DecisionSupportRule.moduleMetadata', 'min'=>0, 'max'=>1},
18
+ 'library' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Library'], 'type'=>'Reference', 'path'=>'DecisionSupportRule.library', 'min'=>0, 'max'=>Float::INFINITY},
19
+ 'trigger' => {'type'=>'TriggerDefinition', 'path'=>'DecisionSupportRule.trigger', 'min'=>0, 'max'=>Float::INFINITY},
20
+ 'condition' => {'type'=>'string', 'path'=>'DecisionSupportRule.condition', 'min'=>0, 'max'=>1},
21
+ 'action' => {'type'=>'ActionDefinition', 'path'=>'DecisionSupportRule.action', 'min'=>0, 'max'=>Float::INFINITY}
22
+ }
23
+
24
+ attr_accessor :id # 0-1 id
25
+ attr_accessor :meta # 0-1 Meta
26
+ attr_accessor :implicitRules # 0-1 uri
27
+ attr_accessor :language # 0-1 code
28
+ attr_accessor :text # 0-1 Narrative
29
+ attr_accessor :contained # 0-* [ Resource ]
30
+ attr_accessor :extension # 0-* [ Extension ]
31
+ attr_accessor :modifierExtension # 0-* [ Extension ]
32
+ attr_accessor :moduleMetadata # 0-1 ModuleMetadata
33
+ attr_accessor :library # 0-* [ Reference(Library) ]
34
+ attr_accessor :trigger # 0-* [ TriggerDefinition ]
35
+ attr_accessor :condition # 0-1 string
36
+ attr_accessor :action # 0-* [ ActionDefinition ]
37
+
38
+ def resourceType
39
+ 'DecisionSupportRule'
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,40 @@
1
+ module FHIR
2
+ class DecisionSupportServiceModule < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["description", "identifier", "status", "title", "topic", "version"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'DecisionSupportServiceModule.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'DecisionSupportServiceModule.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'DecisionSupportServiceModule.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'DecisionSupportServiceModule.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'DecisionSupportServiceModule.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'DecisionSupportServiceModule.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'DecisionSupportServiceModule.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'DecisionSupportServiceModule.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'moduleMetadata' => {'type'=>'ModuleMetadata', 'path'=>'DecisionSupportServiceModule.moduleMetadata', 'min'=>0, 'max'=>1},
18
+ 'trigger' => {'type'=>'TriggerDefinition', 'path'=>'DecisionSupportServiceModule.trigger', 'min'=>0, 'max'=>Float::INFINITY},
19
+ 'parameter' => {'type'=>'ParameterDefinition', 'path'=>'DecisionSupportServiceModule.parameter', 'min'=>0, 'max'=>Float::INFINITY},
20
+ 'dataRequirement' => {'type'=>'DataRequirement', 'path'=>'DecisionSupportServiceModule.dataRequirement', 'min'=>0, 'max'=>Float::INFINITY}
21
+ }
22
+
23
+ attr_accessor :id # 0-1 id
24
+ attr_accessor :meta # 0-1 Meta
25
+ attr_accessor :implicitRules # 0-1 uri
26
+ attr_accessor :language # 0-1 code
27
+ attr_accessor :text # 0-1 Narrative
28
+ attr_accessor :contained # 0-* [ Resource ]
29
+ attr_accessor :extension # 0-* [ Extension ]
30
+ attr_accessor :modifierExtension # 0-* [ Extension ]
31
+ attr_accessor :moduleMetadata # 0-1 ModuleMetadata
32
+ attr_accessor :trigger # 0-* [ TriggerDefinition ]
33
+ attr_accessor :parameter # 0-* [ ParameterDefinition ]
34
+ attr_accessor :dataRequirement # 0-* [ DataRequirement ]
35
+
36
+ def resourceType
37
+ 'DecisionSupportServiceModule'
38
+ end
39
+ end
40
+ end