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,99 @@
1
+ module FHIR
2
+ class ProcessRequest < 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
+ 'request' => ['Identifier', 'Reference'],
12
+ 'response' => ['Identifier', 'Reference']
13
+ }
14
+ SEARCH_PARAMS = ["action", "identifier", "organizationidentifier", "organizationreference", "provideridentifier", "providerreference"]
15
+ METADATA = {
16
+ 'id' => {'type'=>'id', 'path'=>'ProcessRequest.id', 'min'=>0, 'max'=>1},
17
+ 'meta' => {'type'=>'Meta', 'path'=>'ProcessRequest.meta', 'min'=>0, 'max'=>1},
18
+ 'implicitRules' => {'type'=>'uri', 'path'=>'ProcessRequest.implicitRules', 'min'=>0, 'max'=>1},
19
+ 'language' => {'type'=>'code', 'path'=>'ProcessRequest.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
20
+ 'text' => {'type'=>'Narrative', 'path'=>'ProcessRequest.text', 'min'=>0, 'max'=>1},
21
+ 'contained' => {'type'=>'Resource', 'path'=>'ProcessRequest.contained', 'min'=>0, 'max'=>Float::INFINITY},
22
+ 'extension' => {'type'=>'Extension', 'path'=>'ProcessRequest.extension', 'min'=>0, 'max'=>Float::INFINITY},
23
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'ProcessRequest.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
24
+ 'action' => {'valid_codes'=>{'http://hl7.org/fhir/actionlist'=>['cancel', 'poll', 'reprocess', 'status']}, 'type'=>'code', 'path'=>'ProcessRequest.action', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/actionlist'}},
25
+ 'identifier' => {'type'=>'Identifier', 'path'=>'ProcessRequest.identifier', 'min'=>0, 'max'=>Float::INFINITY},
26
+ 'ruleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'ProcessRequest.ruleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
27
+ 'originalRuleset' => {'valid_codes'=>{'http://hl7.org/fhir/ruleset'=>['x12-4010', 'x12-5010', 'x12-7010', 'cdanet-v2', 'cdanet-v4', 'cpha-3']}, 'type'=>'Coding', 'path'=>'ProcessRequest.originalRuleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
28
+ 'created' => {'type'=>'dateTime', 'path'=>'ProcessRequest.created', 'min'=>0, 'max'=>1},
29
+ 'targetIdentifier' => {'type'=>'Identifier', 'path'=>'ProcessRequest.target[x]', 'min'=>0, 'max'=>1},
30
+ 'targetReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'ProcessRequest.target[x]', 'min'=>0, 'max'=>1},
31
+ 'providerIdentifier' => {'type'=>'Identifier', 'path'=>'ProcessRequest.provider[x]', 'min'=>0, 'max'=>1},
32
+ 'providerReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'ProcessRequest.provider[x]', 'min'=>0, 'max'=>1},
33
+ 'organizationIdentifier' => {'type'=>'Identifier', 'path'=>'ProcessRequest.organization[x]', 'min'=>0, 'max'=>1},
34
+ 'organizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'ProcessRequest.organization[x]', 'min'=>0, 'max'=>1},
35
+ 'requestIdentifier' => {'type'=>'Identifier', 'path'=>'ProcessRequest.request[x]', 'min'=>0, 'max'=>1},
36
+ 'requestReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'ProcessRequest.request[x]', 'min'=>0, 'max'=>1},
37
+ 'responseIdentifier' => {'type'=>'Identifier', 'path'=>'ProcessRequest.response[x]', 'min'=>0, 'max'=>1},
38
+ 'responseReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'ProcessRequest.response[x]', 'min'=>0, 'max'=>1},
39
+ 'nullify' => {'type'=>'boolean', 'path'=>'ProcessRequest.nullify', 'min'=>0, 'max'=>1},
40
+ 'reference' => {'type'=>'string', 'path'=>'ProcessRequest.reference', 'min'=>0, 'max'=>1},
41
+ 'item' => {'type'=>'ProcessRequest::Item', 'path'=>'ProcessRequest.item', 'min'=>0, 'max'=>Float::INFINITY},
42
+ 'include' => {'type'=>'string', 'path'=>'ProcessRequest.include', 'min'=>0, 'max'=>Float::INFINITY},
43
+ 'exclude' => {'type'=>'string', 'path'=>'ProcessRequest.exclude', 'min'=>0, 'max'=>Float::INFINITY},
44
+ 'period' => {'type'=>'Period', 'path'=>'ProcessRequest.period', 'min'=>0, 'max'=>1}
45
+ }
46
+
47
+ class Item < FHIR::Model
48
+ include FHIR::Hashable
49
+ include FHIR::Json
50
+ include FHIR::Xml
51
+
52
+ METADATA = {
53
+ 'id' => {'type'=>'id', 'path'=>'Item.id', 'min'=>0, 'max'=>1},
54
+ 'extension' => {'type'=>'Extension', 'path'=>'Item.extension', 'min'=>0, 'max'=>Float::INFINITY},
55
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Item.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
56
+ 'sequenceLinkId' => {'type'=>'integer', 'path'=>'Item.sequenceLinkId', 'min'=>1, 'max'=>1}
57
+ }
58
+
59
+ attr_accessor :id # 0-1 id
60
+ attr_accessor :extension # 0-* [ Extension ]
61
+ attr_accessor :modifierExtension # 0-* [ Extension ]
62
+ attr_accessor :sequenceLinkId # 1-1 integer
63
+ end
64
+
65
+ attr_accessor :id # 0-1 id
66
+ attr_accessor :meta # 0-1 Meta
67
+ attr_accessor :implicitRules # 0-1 uri
68
+ attr_accessor :language # 0-1 code
69
+ attr_accessor :text # 0-1 Narrative
70
+ attr_accessor :contained # 0-* [ Resource ]
71
+ attr_accessor :extension # 0-* [ Extension ]
72
+ attr_accessor :modifierExtension # 0-* [ Extension ]
73
+ attr_accessor :action # 1-1 code
74
+ attr_accessor :identifier # 0-* [ Identifier ]
75
+ attr_accessor :ruleset # 0-1 Coding
76
+ attr_accessor :originalRuleset # 0-1 Coding
77
+ attr_accessor :created # 0-1 dateTime
78
+ attr_accessor :targetIdentifier # 0-1 Identifier
79
+ attr_accessor :targetReference # 0-1 Reference(Organization)
80
+ attr_accessor :providerIdentifier # 0-1 Identifier
81
+ attr_accessor :providerReference # 0-1 Reference(Practitioner)
82
+ attr_accessor :organizationIdentifier # 0-1 Identifier
83
+ attr_accessor :organizationReference # 0-1 Reference(Organization)
84
+ attr_accessor :requestIdentifier # 0-1 Identifier
85
+ attr_accessor :requestReference # 0-1 Reference(Resource)
86
+ attr_accessor :responseIdentifier # 0-1 Identifier
87
+ attr_accessor :responseReference # 0-1 Reference(Resource)
88
+ attr_accessor :nullify # 0-1 boolean
89
+ attr_accessor :reference # 0-1 string
90
+ attr_accessor :item # 0-* [ ProcessRequest::Item ]
91
+ attr_accessor :include # 0-* [ string ]
92
+ attr_accessor :exclude # 0-* [ string ]
93
+ attr_accessor :period # 0-1 Period
94
+
95
+ def resourceType
96
+ 'ProcessRequest'
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,92 @@
1
+ module FHIR
2
+ class ProcessResponse < 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 = ["identifier", "organizationidentifier", "organizationreference", "requestidentifier", "requestorganizationidentifier", "requestorganizationreference", "requestprovideridentifier", "requestproviderreference", "requestreference"]
14
+ METADATA = {
15
+ 'id' => {'type'=>'id', 'path'=>'ProcessResponse.id', 'min'=>0, 'max'=>1},
16
+ 'meta' => {'type'=>'Meta', 'path'=>'ProcessResponse.meta', 'min'=>0, 'max'=>1},
17
+ 'implicitRules' => {'type'=>'uri', 'path'=>'ProcessResponse.implicitRules', 'min'=>0, 'max'=>1},
18
+ 'language' => {'type'=>'code', 'path'=>'ProcessResponse.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
19
+ 'text' => {'type'=>'Narrative', 'path'=>'ProcessResponse.text', 'min'=>0, 'max'=>1},
20
+ 'contained' => {'type'=>'Resource', 'path'=>'ProcessResponse.contained', 'min'=>0, 'max'=>Float::INFINITY},
21
+ 'extension' => {'type'=>'Extension', 'path'=>'ProcessResponse.extension', 'min'=>0, 'max'=>Float::INFINITY},
22
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'ProcessResponse.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
23
+ 'identifier' => {'type'=>'Identifier', 'path'=>'ProcessResponse.identifier', 'min'=>0, 'max'=>Float::INFINITY},
24
+ 'requestIdentifier' => {'type'=>'Identifier', 'path'=>'ProcessResponse.request[x]', 'min'=>0, 'max'=>1},
25
+ 'requestReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'ProcessResponse.request[x]', 'min'=>0, 'max'=>1},
26
+ 'outcome' => {'valid_codes'=>{'http://hl7.org/fhir/processoutcomecodes'=>['complete', 'pended', 'error']}, 'type'=>'Coding', 'path'=>'ProcessResponse.outcome', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/process-outcome'}},
27
+ 'disposition' => {'type'=>'string', 'path'=>'ProcessResponse.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'=>'ProcessResponse.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'=>'ProcessResponse.originalRuleset', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ruleset'}},
30
+ 'created' => {'type'=>'dateTime', 'path'=>'ProcessResponse.created', 'min'=>0, 'max'=>1},
31
+ 'organizationIdentifier' => {'type'=>'Identifier', 'path'=>'ProcessResponse.organization[x]', 'min'=>0, 'max'=>1},
32
+ 'organizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'ProcessResponse.organization[x]', 'min'=>0, 'max'=>1},
33
+ 'requestProviderIdentifier' => {'type'=>'Identifier', 'path'=>'ProcessResponse.requestProvider[x]', 'min'=>0, 'max'=>1},
34
+ 'requestProviderReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'ProcessResponse.requestProvider[x]', 'min'=>0, 'max'=>1},
35
+ 'requestOrganizationIdentifier' => {'type'=>'Identifier', 'path'=>'ProcessResponse.requestOrganization[x]', 'min'=>0, 'max'=>1},
36
+ 'requestOrganizationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'ProcessResponse.requestOrganization[x]', 'min'=>0, 'max'=>1},
37
+ 'form' => {'valid_codes'=>{'http://hl7.org/fhir/forms-codes'=>['1', '2']}, 'type'=>'Coding', 'path'=>'ProcessResponse.form', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/forms'}},
38
+ 'notes' => {'type'=>'ProcessResponse::Notes', 'path'=>'ProcessResponse.notes', 'min'=>0, 'max'=>Float::INFINITY},
39
+ 'error' => {'valid_codes'=>{'http://hl7.org/fhir/adjudication-error'=>['a001', 'a002']}, 'type'=>'Coding', 'path'=>'ProcessResponse.error', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/adjudication-error'}}
40
+ }
41
+
42
+ class Notes < FHIR::Model
43
+ include FHIR::Hashable
44
+ include FHIR::Json
45
+ include FHIR::Xml
46
+
47
+ METADATA = {
48
+ 'id' => {'type'=>'id', 'path'=>'Notes.id', 'min'=>0, 'max'=>1},
49
+ 'extension' => {'type'=>'Extension', 'path'=>'Notes.extension', 'min'=>0, 'max'=>Float::INFINITY},
50
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Notes.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
51
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/note-type'=>['display', 'print', 'printoper']}, 'type'=>'Coding', 'path'=>'Notes.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/note-type'}},
52
+ 'text' => {'type'=>'string', 'path'=>'Notes.text', 'min'=>0, 'max'=>1}
53
+ }
54
+
55
+ attr_accessor :id # 0-1 id
56
+ attr_accessor :extension # 0-* [ Extension ]
57
+ attr_accessor :modifierExtension # 0-* [ Extension ]
58
+ attr_accessor :type # 0-1 Coding
59
+ attr_accessor :text # 0-1 string
60
+ end
61
+
62
+ attr_accessor :id # 0-1 id
63
+ attr_accessor :meta # 0-1 Meta
64
+ attr_accessor :implicitRules # 0-1 uri
65
+ attr_accessor :language # 0-1 code
66
+ attr_accessor :text # 0-1 Narrative
67
+ attr_accessor :contained # 0-* [ Resource ]
68
+ attr_accessor :extension # 0-* [ Extension ]
69
+ attr_accessor :modifierExtension # 0-* [ Extension ]
70
+ attr_accessor :identifier # 0-* [ Identifier ]
71
+ attr_accessor :requestIdentifier # 0-1 Identifier
72
+ attr_accessor :requestReference # 0-1 Reference(Resource)
73
+ attr_accessor :outcome # 0-1 Coding
74
+ attr_accessor :disposition # 0-1 string
75
+ attr_accessor :ruleset # 0-1 Coding
76
+ attr_accessor :originalRuleset # 0-1 Coding
77
+ attr_accessor :created # 0-1 dateTime
78
+ attr_accessor :organizationIdentifier # 0-1 Identifier
79
+ attr_accessor :organizationReference # 0-1 Reference(Organization)
80
+ attr_accessor :requestProviderIdentifier # 0-1 Identifier
81
+ attr_accessor :requestProviderReference # 0-1 Reference(Practitioner)
82
+ attr_accessor :requestOrganizationIdentifier # 0-1 Identifier
83
+ attr_accessor :requestOrganizationReference # 0-1 Reference(Organization)
84
+ attr_accessor :form # 0-1 Coding
85
+ attr_accessor :notes # 0-* [ ProcessResponse::Notes ]
86
+ attr_accessor :error # 0-* [ Coding ]
87
+
88
+ def resourceType
89
+ 'ProcessResponse'
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,242 @@
1
+ module FHIR
2
+ class Protocol < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["identifier", "subject"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'Protocol.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'Protocol.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'Protocol.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'Protocol.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'Protocol.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'Protocol.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'Protocol.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Protocol.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Protocol.identifier', 'min'=>0, 'max'=>Float::INFINITY},
18
+ 'title' => {'type'=>'string', 'path'=>'Protocol.title', 'min'=>0, 'max'=>1},
19
+ 'status' => {'valid_codes'=>{'http://hl7.org/fhir/protocol-status'=>['draft', 'testing', 'review', 'active', 'withdrawn', 'superseded']}, 'type'=>'code', 'path'=>'Protocol.status', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/protocol-status'}},
20
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/protocol-type'=>['condition', 'device', 'drug', 'study']}, 'type'=>'code', 'path'=>'Protocol.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/protocol-type'}},
21
+ 'subject' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Condition', 'http://hl7.org/fhir/StructureDefinition/Device', 'http://hl7.org/fhir/StructureDefinition/Medication'], 'type'=>'Reference', 'path'=>'Protocol.subject', 'min'=>0, 'max'=>1},
22
+ 'group' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Group'], 'type'=>'Reference', 'path'=>'Protocol.group', 'min'=>0, 'max'=>1},
23
+ 'purpose' => {'type'=>'string', 'path'=>'Protocol.purpose', 'min'=>1, 'max'=>1},
24
+ 'author' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Protocol.author', 'min'=>0, 'max'=>1},
25
+ 'step' => {'type'=>'Protocol::Step', 'path'=>'Protocol.step', 'min'=>0, 'max'=>Float::INFINITY}
26
+ }
27
+
28
+ class Step < FHIR::Model
29
+ include FHIR::Hashable
30
+ include FHIR::Json
31
+ include FHIR::Xml
32
+
33
+ METADATA = {
34
+ 'id' => {'type'=>'id', 'path'=>'Step.id', 'min'=>0, 'max'=>1},
35
+ 'extension' => {'type'=>'Extension', 'path'=>'Step.extension', 'min'=>0, 'max'=>Float::INFINITY},
36
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Step.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
37
+ 'name' => {'type'=>'string', 'path'=>'Step.name', 'min'=>0, 'max'=>1},
38
+ 'description' => {'type'=>'string', 'path'=>'Step.description', 'min'=>0, 'max'=>1},
39
+ 'duration' => {'type'=>'Quantity', 'path'=>'Step.duration', 'min'=>0, 'max'=>1},
40
+ 'precondition' => {'type'=>'Protocol::Step::Precondition', 'path'=>'Step.precondition', 'min'=>0, 'max'=>1},
41
+ 'exit' => {'type'=>'Protocol::Step::Precondition', 'path'=>'Step.exit', 'min'=>0, 'max'=>1},
42
+ 'firstActivity' => {'type'=>'uri', 'path'=>'Step.firstActivity', 'min'=>0, 'max'=>1},
43
+ 'activity' => {'type'=>'Protocol::Step::Activity', 'path'=>'Step.activity', 'min'=>0, 'max'=>Float::INFINITY},
44
+ 'next' => {'type'=>'Protocol::Step::Next', 'path'=>'Step.next', 'min'=>0, 'max'=>Float::INFINITY}
45
+ }
46
+
47
+ class Precondition < FHIR::Model
48
+ include FHIR::Hashable
49
+ include FHIR::Json
50
+ include FHIR::Xml
51
+
52
+ METADATA = {
53
+ 'id' => {'type'=>'id', 'path'=>'Precondition.id', 'min'=>0, 'max'=>1},
54
+ 'extension' => {'type'=>'Extension', 'path'=>'Precondition.extension', 'min'=>0, 'max'=>Float::INFINITY},
55
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Precondition.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
56
+ 'description' => {'type'=>'string', 'path'=>'Precondition.description', 'min'=>0, 'max'=>1},
57
+ 'condition' => {'type'=>'Protocol::Step::Precondition::Condition', 'path'=>'Precondition.condition', 'min'=>0, 'max'=>1},
58
+ 'intersection' => {'type'=>'Protocol::Step::Precondition', 'path'=>'Precondition.intersection', 'min'=>0, 'max'=>Float::INFINITY},
59
+ 'union' => {'type'=>'Protocol::Step::Precondition', 'path'=>'Precondition.union', 'min'=>0, 'max'=>Float::INFINITY},
60
+ 'exclude' => {'type'=>'Protocol::Step::Precondition', 'path'=>'Precondition.exclude', 'min'=>0, 'max'=>Float::INFINITY}
61
+ }
62
+
63
+ class Condition < FHIR::Model
64
+ include FHIR::Hashable
65
+ include FHIR::Json
66
+ include FHIR::Xml
67
+
68
+ MULTIPLE_TYPES = {
69
+ 'value' => ['CodeableConcept', 'boolean', 'Quantity', 'Range']
70
+ }
71
+ METADATA = {
72
+ 'id' => {'type'=>'id', 'path'=>'Condition.id', 'min'=>0, 'max'=>1},
73
+ 'extension' => {'type'=>'Extension', 'path'=>'Condition.extension', 'min'=>0, 'max'=>Float::INFINITY},
74
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Condition.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
75
+ 'type' => {'type'=>'CodeableConcept', 'path'=>'Condition.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>nil}},
76
+ 'valueCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'Condition.value[x]', 'min'=>1, 'max'=>1},
77
+ 'valueBoolean' => {'type'=>'boolean', 'path'=>'Condition.value[x]', 'min'=>1, 'max'=>1},
78
+ 'valueQuantity' => {'type'=>'Quantity', 'path'=>'Condition.value[x]', 'min'=>1, 'max'=>1},
79
+ 'valueRange' => {'type'=>'Range', 'path'=>'Condition.value[x]', 'min'=>1, 'max'=>1}
80
+ }
81
+
82
+ attr_accessor :id # 0-1 id
83
+ attr_accessor :extension # 0-* [ Extension ]
84
+ attr_accessor :modifierExtension # 0-* [ Extension ]
85
+ attr_accessor :type # 1-1 CodeableConcept
86
+ attr_accessor :valueCodeableConcept # 1-1 CodeableConcept
87
+ attr_accessor :valueBoolean # 1-1 boolean
88
+ attr_accessor :valueQuantity # 1-1 Quantity
89
+ attr_accessor :valueRange # 1-1 Range
90
+ end
91
+
92
+ attr_accessor :id # 0-1 id
93
+ attr_accessor :extension # 0-* [ Extension ]
94
+ attr_accessor :modifierExtension # 0-* [ Extension ]
95
+ attr_accessor :description # 0-1 string
96
+ attr_accessor :condition # 0-1 Protocol::Step::Precondition::Condition
97
+ attr_accessor :intersection # 0-* [ Protocol::Step::Precondition ]
98
+ attr_accessor :union # 0-* [ Protocol::Step::Precondition ]
99
+ attr_accessor :exclude # 0-* [ Protocol::Step::Precondition ]
100
+ end
101
+
102
+ class Activity < FHIR::Model
103
+ include FHIR::Hashable
104
+ include FHIR::Json
105
+ include FHIR::Xml
106
+
107
+ METADATA = {
108
+ 'id' => {'type'=>'id', 'path'=>'Activity.id', 'min'=>0, 'max'=>1},
109
+ 'extension' => {'type'=>'Extension', 'path'=>'Activity.extension', 'min'=>0, 'max'=>Float::INFINITY},
110
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Activity.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
111
+ 'alternative' => {'type'=>'uri', 'path'=>'Activity.alternative', 'min'=>0, 'max'=>Float::INFINITY},
112
+ 'component' => {'type'=>'Protocol::Step::Activity::Component', 'path'=>'Activity.component', 'min'=>0, 'max'=>Float::INFINITY},
113
+ 'following' => {'type'=>'uri', 'path'=>'Activity.following', 'min'=>0, 'max'=>Float::INFINITY},
114
+ 'wait' => {'type'=>'Quantity', 'path'=>'Activity.wait', 'min'=>0, 'max'=>1},
115
+ 'detail' => {'type'=>'Protocol::Step::Activity::Detail', 'path'=>'Activity.detail', 'min'=>1, 'max'=>1}
116
+ }
117
+
118
+ class Component < FHIR::Model
119
+ include FHIR::Hashable
120
+ include FHIR::Json
121
+ include FHIR::Xml
122
+
123
+ METADATA = {
124
+ 'id' => {'type'=>'id', 'path'=>'Component.id', 'min'=>0, 'max'=>1},
125
+ 'extension' => {'type'=>'Extension', 'path'=>'Component.extension', 'min'=>0, 'max'=>Float::INFINITY},
126
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Component.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
127
+ 'sequence' => {'type'=>'integer', 'path'=>'Component.sequence', 'min'=>0, 'max'=>1},
128
+ 'activity' => {'type'=>'uri', 'path'=>'Component.activity', 'min'=>1, 'max'=>1}
129
+ }
130
+
131
+ attr_accessor :id # 0-1 id
132
+ attr_accessor :extension # 0-* [ Extension ]
133
+ attr_accessor :modifierExtension # 0-* [ Extension ]
134
+ attr_accessor :sequence # 0-1 integer
135
+ attr_accessor :activity # 1-1 uri
136
+ end
137
+
138
+ class Detail < FHIR::Model
139
+ include FHIR::Hashable
140
+ include FHIR::Json
141
+ include FHIR::Xml
142
+
143
+ MULTIPLE_TYPES = {
144
+ 'timing' => ['CodeableConcept', 'Timing']
145
+ }
146
+ METADATA = {
147
+ 'id' => {'type'=>'id', 'path'=>'Detail.id', 'min'=>0, 'max'=>1},
148
+ 'extension' => {'type'=>'Extension', 'path'=>'Detail.extension', 'min'=>0, 'max'=>Float::INFINITY},
149
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Detail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
150
+ 'category' => {'valid_codes'=>{'http://hl7.org/fhir/activity-definition-category'=>['diet', 'drug', 'encounter', 'observation', 'procedure', 'supply', 'other']}, 'type'=>'code', 'path'=>'Detail.category', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/activity-definition-category'}},
151
+ 'code' => {'type'=>'CodeableConcept', 'path'=>'Detail.code', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>nil}},
152
+ 'timingCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'Detail.timing[x]', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>nil}},
153
+ 'timingTiming' => {'type'=>'Timing', 'path'=>'Detail.timing[x]', 'min'=>0, 'max'=>1},
154
+ 'location' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Detail.location', 'min'=>0, 'max'=>1},
155
+ 'performer' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson', 'http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'Detail.performer', 'min'=>0, 'max'=>Float::INFINITY},
156
+ 'product' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Medication', 'http://hl7.org/fhir/StructureDefinition/Substance'], 'type'=>'Reference', 'path'=>'Detail.product', 'min'=>0, 'max'=>1},
157
+ 'quantity' => {'type'=>'Quantity', 'path'=>'Detail.quantity', 'min'=>0, 'max'=>1},
158
+ 'description' => {'type'=>'string', 'path'=>'Detail.description', 'min'=>0, 'max'=>1}
159
+ }
160
+
161
+ attr_accessor :id # 0-1 id
162
+ attr_accessor :extension # 0-* [ Extension ]
163
+ attr_accessor :modifierExtension # 0-* [ Extension ]
164
+ attr_accessor :category # 0-1 code
165
+ attr_accessor :code # 0-1 CodeableConcept
166
+ attr_accessor :timingCodeableConcept # 0-1 CodeableConcept
167
+ attr_accessor :timingTiming # 0-1 Timing
168
+ attr_accessor :location # 0-1 Reference(Location)
169
+ attr_accessor :performer # 0-* [ Reference(Practitioner|Organization|RelatedPerson|Patient) ]
170
+ attr_accessor :product # 0-1 Reference(Medication|Substance)
171
+ attr_accessor :quantity # 0-1 Quantity
172
+ attr_accessor :description # 0-1 string
173
+ end
174
+
175
+ attr_accessor :id # 0-1 id
176
+ attr_accessor :extension # 0-* [ Extension ]
177
+ attr_accessor :modifierExtension # 0-* [ Extension ]
178
+ attr_accessor :alternative # 0-* [ uri ]
179
+ attr_accessor :component # 0-* [ Protocol::Step::Activity::Component ]
180
+ attr_accessor :following # 0-* [ uri ]
181
+ attr_accessor :wait # 0-1 Quantity
182
+ attr_accessor :detail # 1-1 Protocol::Step::Activity::Detail
183
+ end
184
+
185
+ class Next < FHIR::Model
186
+ include FHIR::Hashable
187
+ include FHIR::Json
188
+ include FHIR::Xml
189
+
190
+ METADATA = {
191
+ 'id' => {'type'=>'id', 'path'=>'Next.id', 'min'=>0, 'max'=>1},
192
+ 'extension' => {'type'=>'Extension', 'path'=>'Next.extension', 'min'=>0, 'max'=>Float::INFINITY},
193
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Next.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
194
+ 'description' => {'type'=>'string', 'path'=>'Next.description', 'min'=>0, 'max'=>1},
195
+ 'reference' => {'type'=>'uri', 'path'=>'Next.reference', 'min'=>0, 'max'=>1},
196
+ 'condition' => {'type'=>'Protocol::Step::Precondition', 'path'=>'Next.condition', 'min'=>0, 'max'=>1}
197
+ }
198
+
199
+ attr_accessor :id # 0-1 id
200
+ attr_accessor :extension # 0-* [ Extension ]
201
+ attr_accessor :modifierExtension # 0-* [ Extension ]
202
+ attr_accessor :description # 0-1 string
203
+ attr_accessor :reference # 0-1 uri
204
+ attr_accessor :condition # 0-1 Protocol::Step::Precondition
205
+ end
206
+
207
+ attr_accessor :id # 0-1 id
208
+ attr_accessor :extension # 0-* [ Extension ]
209
+ attr_accessor :modifierExtension # 0-* [ Extension ]
210
+ attr_accessor :name # 0-1 string
211
+ attr_accessor :description # 0-1 string
212
+ attr_accessor :duration # 0-1 Quantity
213
+ attr_accessor :precondition # 0-1 Protocol::Step::Precondition
214
+ attr_accessor :exit # 0-1 Protocol::Step::Precondition
215
+ attr_accessor :firstActivity # 0-1 uri
216
+ attr_accessor :activity # 0-* [ Protocol::Step::Activity ]
217
+ attr_accessor :next # 0-* [ Protocol::Step::Next ]
218
+ end
219
+
220
+ attr_accessor :id # 0-1 id
221
+ attr_accessor :meta # 0-1 Meta
222
+ attr_accessor :implicitRules # 0-1 uri
223
+ attr_accessor :language # 0-1 code
224
+ attr_accessor :text # 0-1 Narrative
225
+ attr_accessor :contained # 0-* [ Resource ]
226
+ attr_accessor :extension # 0-* [ Extension ]
227
+ attr_accessor :modifierExtension # 0-* [ Extension ]
228
+ attr_accessor :identifier # 0-* [ Identifier ]
229
+ attr_accessor :title # 0-1 string
230
+ attr_accessor :status # 1-1 code
231
+ attr_accessor :type # 1-1 code
232
+ attr_accessor :subject # 0-1 Reference(Condition|Device|Medication)
233
+ attr_accessor :group # 0-1 Reference(Group)
234
+ attr_accessor :purpose # 1-1 string
235
+ attr_accessor :author # 0-1 Reference(Organization)
236
+ attr_accessor :step # 0-* [ Protocol::Step ]
237
+
238
+ def resourceType
239
+ 'Protocol'
240
+ end
241
+ end
242
+ end
@@ -0,0 +1,122 @@
1
+ module FHIR
2
+ class Provenance < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["agent", "end", "entity", "entity-type", "location", "patient", "sig", "start", "target", "userid"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'Provenance.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'Provenance.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'Provenance.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'Provenance.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'Provenance.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'Provenance.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'Provenance.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Provenance.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'target' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Provenance.target', 'min'=>1, 'max'=>Float::INFINITY},
18
+ 'period' => {'type'=>'Period', 'path'=>'Provenance.period', 'min'=>0, 'max'=>1},
19
+ 'recorded' => {'type'=>'instant', 'path'=>'Provenance.recorded', 'min'=>1, 'max'=>1},
20
+ 'reason' => {'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'=>'Coding', 'path'=>'Provenance.reason', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-PurposeOfUse'}},
21
+ 'activity' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActStatus'=>['aborted', 'cancelled', 'completed', 'new', 'nullified', 'obsolete'], 'http://hl7.org/fhir/v3/DocumentCompletion'=>['AU', 'DI', 'DO', 'LA', 'UC']}, 'type'=>'Coding', 'path'=>'Provenance.activity', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-ProvenanceEventCurrentState'}},
22
+ 'location' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Provenance.location', 'min'=>0, 'max'=>1},
23
+ 'policy' => {'type'=>'uri', 'path'=>'Provenance.policy', 'min'=>0, 'max'=>Float::INFINITY},
24
+ 'agent' => {'type'=>'Provenance::Agent', 'path'=>'Provenance.agent', 'min'=>1, 'max'=>Float::INFINITY},
25
+ 'entity' => {'type'=>'Provenance::Entity', 'path'=>'Provenance.entity', 'min'=>0, 'max'=>Float::INFINITY},
26
+ 'signature' => {'type'=>'Signature', 'path'=>'Provenance.signature', 'min'=>0, 'max'=>Float::INFINITY}
27
+ }
28
+
29
+ class Agent < FHIR::Model
30
+ include FHIR::Hashable
31
+ include FHIR::Json
32
+ include FHIR::Xml
33
+
34
+ METADATA = {
35
+ 'id' => {'type'=>'id', 'path'=>'Agent.id', 'min'=>0, 'max'=>1},
36
+ 'extension' => {'type'=>'Extension', 'path'=>'Agent.extension', 'min'=>0, 'max'=>Float::INFINITY},
37
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Agent.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
38
+ 'role' => {'valid_codes'=>{'http://hl7.org/fhir/provenance-participant-role'=>['enterer', 'performer', 'author', 'verifier', 'legal', 'attester', 'informant', 'custodian', 'assembler', 'composer']}, 'type'=>'Coding', 'path'=>'Agent.role', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/provenance-agent-role'}},
39
+ 'actor' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson', 'http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Device', 'http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Agent.actor', 'min'=>0, 'max'=>1},
40
+ 'userId' => {'type'=>'Identifier', 'path'=>'Agent.userId', 'min'=>0, 'max'=>1},
41
+ 'relatedAgent' => {'type'=>'Provenance::Agent::Relatedagent', 'path'=>'Agent.relatedAgent', 'min'=>0, 'max'=>Float::INFINITY}
42
+ }
43
+
44
+ class Relatedagent < FHIR::Model
45
+ include FHIR::Hashable
46
+ include FHIR::Json
47
+ include FHIR::Xml
48
+
49
+ METADATA = {
50
+ 'id' => {'type'=>'id', 'path'=>'Relatedagent.id', 'min'=>0, 'max'=>1},
51
+ 'extension' => {'type'=>'Extension', 'path'=>'Relatedagent.extension', 'min'=>0, 'max'=>Float::INFINITY},
52
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Relatedagent.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
53
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/v3/RoleLinkType'=>['REL', 'BACKUP', 'CONT', 'DIRAUTH', 'IDENT', 'INDAUTH', 'PART', 'REPL']}, 'type'=>'CodeableConcept', 'path'=>'Relatedagent.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-RoleLinkType'}},
54
+ 'target' => {'type'=>'uri', 'path'=>'Relatedagent.target', 'min'=>1, 'max'=>1}
55
+ }
56
+
57
+ attr_accessor :id # 0-1 id
58
+ attr_accessor :extension # 0-* [ Extension ]
59
+ attr_accessor :modifierExtension # 0-* [ Extension ]
60
+ attr_accessor :type # 1-1 CodeableConcept
61
+ attr_accessor :target # 1-1 uri
62
+ end
63
+
64
+ attr_accessor :id # 0-1 id
65
+ attr_accessor :extension # 0-* [ Extension ]
66
+ attr_accessor :modifierExtension # 0-* [ Extension ]
67
+ attr_accessor :role # 1-1 Coding
68
+ attr_accessor :actor # 0-1 Reference(Practitioner|RelatedPerson|Patient|Device|Organization)
69
+ attr_accessor :userId # 0-1 Identifier
70
+ attr_accessor :relatedAgent # 0-* [ Provenance::Agent::Relatedagent ]
71
+ end
72
+
73
+ class Entity < FHIR::Model
74
+ include FHIR::Hashable
75
+ include FHIR::Json
76
+ include FHIR::Xml
77
+
78
+ METADATA = {
79
+ 'id' => {'type'=>'id', 'path'=>'Entity.id', 'min'=>0, 'max'=>1},
80
+ 'extension' => {'type'=>'Extension', 'path'=>'Entity.extension', 'min'=>0, 'max'=>Float::INFINITY},
81
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Entity.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
82
+ 'role' => {'valid_codes'=>{'http://hl7.org/fhir/provenance-entity-role'=>['derivation', 'revision', 'quotation', 'source', 'removal']}, 'type'=>'code', 'path'=>'Entity.role', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/provenance-entity-role'}},
83
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/resource-types'=>['Account', 'AllergyIntolerance', 'Appointment', 'AppointmentResponse', 'AuditEvent', 'Basic', 'Binary', 'BodySite', 'Bundle', 'CarePlan', 'CareTeam', 'Claim', 'ClaimResponse', 'ClinicalImpression', 'CodeSystem', 'Communication', 'CommunicationRequest', 'CompartmentDefinition', 'Composition', 'ConceptMap', 'Condition', 'Conformance', 'Contract', 'Coverage', 'DataElement', 'DecisionSupportRule', 'DecisionSupportServiceModule', 'DetectedIssue', 'Device', 'DeviceComponent', 'DeviceMetric', 'DeviceUseRequest', 'DeviceUseStatement', 'DiagnosticOrder', 'DiagnosticReport', 'DocumentManifest', 'DocumentReference', 'DomainResource', 'EligibilityRequest', 'EligibilityResponse', 'Encounter', 'EnrollmentRequest', 'EnrollmentResponse', 'EpisodeOfCare', 'ExpansionProfile', 'ExplanationOfBenefit', 'FamilyMemberHistory', 'Flag', 'Goal', 'Group', 'GuidanceResponse', 'HealthcareService', 'ImagingExcerpt', 'ImagingObjectSelection', 'ImagingStudy', 'Immunization', 'ImmunizationRecommendation', 'ImplementationGuide', 'Library', 'Linkage', 'List', 'Location', 'Measure', 'MeasureReport', 'Media', 'Medication', 'MedicationAdministration', 'MedicationDispense', 'MedicationOrder', 'MedicationStatement', 'MessageHeader', 'ModuleDefinition', 'NamingSystem', 'NutritionOrder', 'Observation', 'OperationDefinition', 'OperationOutcome', 'Order', 'OrderResponse', 'OrderSet', 'Organization', 'Parameters', 'Patient', 'PaymentNotice', 'PaymentReconciliation', 'Person', 'Practitioner', 'PractitionerRole', 'Procedure', 'ProcedureRequest', 'ProcessRequest', 'ProcessResponse', 'Protocol', 'Provenance', 'Questionnaire', 'QuestionnaireResponse', 'ReferralRequest', 'RelatedPerson', 'Resource', 'RiskAssessment', 'Schedule', 'SearchParameter', 'Sequence', 'Slot', 'Specimen', 'StructureDefinition', 'StructureMap', 'Subscription', 'Substance', 'SupplyDelivery', 'SupplyRequest', 'Task', 'TestScript', 'ValueSet', 'VisionPrescription']}, 'type'=>'Coding', 'path'=>'Entity.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/resource-types'}},
84
+ 'reference' => {'type'=>'uri', 'path'=>'Entity.reference', 'min'=>1, 'max'=>1},
85
+ 'display' => {'type'=>'string', 'path'=>'Entity.display', 'min'=>0, 'max'=>1},
86
+ 'agent' => {'type'=>'Provenance::Agent', 'path'=>'Entity.agent', 'min'=>0, 'max'=>1}
87
+ }
88
+
89
+ attr_accessor :id # 0-1 id
90
+ attr_accessor :extension # 0-* [ Extension ]
91
+ attr_accessor :modifierExtension # 0-* [ Extension ]
92
+ attr_accessor :role # 1-1 code
93
+ attr_accessor :type # 1-1 Coding
94
+ attr_accessor :reference # 1-1 uri
95
+ attr_accessor :display # 0-1 string
96
+ attr_accessor :agent # 0-1 Provenance::Agent
97
+ end
98
+
99
+ attr_accessor :id # 0-1 id
100
+ attr_accessor :meta # 0-1 Meta
101
+ attr_accessor :implicitRules # 0-1 uri
102
+ attr_accessor :language # 0-1 code
103
+ attr_accessor :text # 0-1 Narrative
104
+ attr_accessor :contained # 0-* [ Resource ]
105
+ attr_accessor :extension # 0-* [ Extension ]
106
+ attr_accessor :modifierExtension # 0-* [ Extension ]
107
+ attr_accessor :target # 1-* [ Reference(Resource) ]
108
+ attr_accessor :period # 0-1 Period
109
+ attr_accessor :recorded # 1-1 instant
110
+ attr_accessor :reason # 0-* [ Coding ]
111
+ attr_accessor :activity # 0-1 Coding
112
+ attr_accessor :location # 0-1 Reference(Location)
113
+ attr_accessor :policy # 0-* [ uri ]
114
+ attr_accessor :agent # 1-* [ Provenance::Agent ]
115
+ attr_accessor :entity # 0-* [ Provenance::Entity ]
116
+ attr_accessor :signature # 0-* [ Signature ]
117
+
118
+ def resourceType
119
+ 'Provenance'
120
+ end
121
+ end
122
+ end