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,48 @@
1
+ module FHIR
2
+ class AppointmentResponse < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["actor", "appointment", "identifier", "location", "part-status", "patient", "practitioner"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'AppointmentResponse.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'AppointmentResponse.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'AppointmentResponse.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'AppointmentResponse.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'AppointmentResponse.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'AppointmentResponse.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'AppointmentResponse.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'AppointmentResponse.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'identifier' => {'type'=>'Identifier', 'path'=>'AppointmentResponse.identifier', 'min'=>0, 'max'=>Float::INFINITY},
18
+ 'appointment' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Appointment'], 'type'=>'Reference', 'path'=>'AppointmentResponse.appointment', 'min'=>1, 'max'=>1},
19
+ 'start' => {'type'=>'instant', 'path'=>'AppointmentResponse.start', 'min'=>0, 'max'=>1},
20
+ 'end' => {'type'=>'instant', 'path'=>'AppointmentResponse.end', 'min'=>0, 'max'=>1},
21
+ 'participantType' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ParticipationType'=>['ADM', 'ATND', 'CALLBCK', 'CON', 'DIS', 'ESC', 'REF', 'SPRF', 'PPRF', 'PART'], 'http://hl7.org/fhir/participant-type'=>['translator', 'emergency']}, 'type'=>'CodeableConcept', 'path'=>'AppointmentResponse.participantType', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/encounter-participant-type'}},
22
+ 'actor' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson', 'http://hl7.org/fhir/StructureDefinition/Device', 'http://hl7.org/fhir/StructureDefinition/HealthcareService', 'http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'AppointmentResponse.actor', 'min'=>0, 'max'=>1},
23
+ 'participantStatus' => {'valid_codes'=>{'http://hl7.org/fhir/participationstatus'=>['accepted', 'declined', 'tentative', 'needs-action']}, 'type'=>'code', 'path'=>'AppointmentResponse.participantStatus', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/participationstatus'}},
24
+ 'comment' => {'type'=>'string', 'path'=>'AppointmentResponse.comment', 'min'=>0, 'max'=>1}
25
+ }
26
+
27
+ attr_accessor :id # 0-1 id
28
+ attr_accessor :meta # 0-1 Meta
29
+ attr_accessor :implicitRules # 0-1 uri
30
+ attr_accessor :language # 0-1 code
31
+ attr_accessor :text # 0-1 Narrative
32
+ attr_accessor :contained # 0-* [ Resource ]
33
+ attr_accessor :extension # 0-* [ Extension ]
34
+ attr_accessor :modifierExtension # 0-* [ Extension ]
35
+ attr_accessor :identifier # 0-* [ Identifier ]
36
+ attr_accessor :appointment # 1-1 Reference(Appointment)
37
+ attr_accessor :start # 0-1 instant
38
+ attr_accessor :end # 0-1 instant
39
+ attr_accessor :participantType # 0-* [ CodeableConcept ]
40
+ attr_accessor :actor # 0-1 Reference(Patient|Practitioner|RelatedPerson|Device|HealthcareService|Location)
41
+ attr_accessor :participantStatus # 1-1 code
42
+ attr_accessor :comment # 0-1 string
43
+
44
+ def resourceType
45
+ 'AppointmentResponse'
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,188 @@
1
+ module FHIR
2
+ class AuditEvent < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["action", "address", "agent", "agent-name", "altid", "date", "entity", "entity-id", "entity-name", "entity-type", "patient", "policy", "site", "source", "subtype", "type", "user"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'AuditEvent.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'AuditEvent.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'AuditEvent.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'AuditEvent.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'AuditEvent.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'AuditEvent.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'AuditEvent.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'AuditEvent.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'type' => {'valid_codes'=>{'http://nema.org/dicom/dicm'=>['110100', '110101', '110102', '110103', '110104', '110105', '110106', '110107', '110108', '110109', '110110', '110111', '110112', '110113', '110114'], 'http://hl7.org/fhir/audit-event-type'=>['rest']}, 'type'=>'Coding', 'path'=>'AuditEvent.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/audit-event-type'}},
18
+ 'subtype' => {'valid_codes'=>{'http://nema.org/dicom/dicm'=>['110120', '110121', '110122', '110123', '110124', '110125', '110126', '110127', '110128', '110129', '110130', '110131', '110132', '110133', '110134', '110135', '110136', '110137', '110138', '110139', '110140', '110141', '110142'], 'http://hl7.org/fhir/restful-interaction'=>['read', 'vread', 'update', 'delete', 'history', 'history-instance', 'history-type', 'history-system', 'create', 'search', 'search-type', 'search-system', 'conformance', 'transaction', 'batch', 'operation']}, 'type'=>'Coding', 'path'=>'AuditEvent.subtype', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/audit-event-sub-type'}},
19
+ 'action' => {'valid_codes'=>{'http://hl7.org/fhir/audit-event-action'=>['C', 'R', 'U', 'D', 'E']}, 'type'=>'code', 'path'=>'AuditEvent.action', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/audit-event-action'}},
20
+ 'recorded' => {'type'=>'instant', 'path'=>'AuditEvent.recorded', 'min'=>1, 'max'=>1},
21
+ 'outcome' => {'valid_codes'=>{'http://hl7.org/fhir/audit-event-outcome'=>['0', '4', '8', '12']}, 'type'=>'code', 'path'=>'AuditEvent.outcome', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/audit-event-outcome'}},
22
+ 'outcomeDesc' => {'type'=>'string', 'path'=>'AuditEvent.outcomeDesc', 'min'=>0, 'max'=>1},
23
+ 'purposeOfEvent' => {'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'=>'AuditEvent.purposeOfEvent', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-PurposeOfUse'}},
24
+ 'agent' => {'type'=>'AuditEvent::Agent', 'path'=>'AuditEvent.agent', 'min'=>1, 'max'=>Float::INFINITY},
25
+ 'source' => {'type'=>'AuditEvent::Source', 'path'=>'AuditEvent.source', 'min'=>1, 'max'=>1},
26
+ 'entity' => {'type'=>'AuditEvent::Entity', 'path'=>'AuditEvent.entity', '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://nema.org/dicom/dicm'=>['110150', '110151', '110152', '110153', '110154', '110155']}, 'type'=>'CodeableConcept', 'path'=>'Agent.role', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/dicm-402-roleid'}},
39
+ 'reference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Device', 'http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson'], 'type'=>'Reference', 'path'=>'Agent.reference', 'min'=>0, 'max'=>1},
40
+ 'userId' => {'type'=>'Identifier', 'path'=>'Agent.userId', 'min'=>0, 'max'=>1},
41
+ 'altId' => {'type'=>'string', 'path'=>'Agent.altId', 'min'=>0, 'max'=>1},
42
+ 'name' => {'type'=>'string', 'path'=>'Agent.name', 'min'=>0, 'max'=>1},
43
+ 'requestor' => {'type'=>'boolean', 'path'=>'Agent.requestor', 'min'=>1, 'max'=>1},
44
+ 'location' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Agent.location', 'min'=>0, 'max'=>1},
45
+ 'policy' => {'type'=>'uri', 'path'=>'Agent.policy', 'min'=>0, 'max'=>Float::INFINITY},
46
+ 'media' => {'valid_codes'=>{'http://nema.org/dicom/dicm'=>['110030', '110031', '110032', '110033', '110034', '110035', '110036', '110037', '110010', '110038']}, 'type'=>'Coding', 'path'=>'Agent.media', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/dicm-405-mediatype'}},
47
+ 'network' => {'type'=>'AuditEvent::Agent::Network', 'path'=>'Agent.network', 'min'=>0, 'max'=>1},
48
+ 'purposeOfUse' => {'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'=>'Agent.purposeOfUse', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-PurposeOfUse'}}
49
+ }
50
+
51
+ class Network < FHIR::Model
52
+ include FHIR::Hashable
53
+ include FHIR::Json
54
+ include FHIR::Xml
55
+
56
+ METADATA = {
57
+ 'id' => {'type'=>'id', 'path'=>'Network.id', 'min'=>0, 'max'=>1},
58
+ 'extension' => {'type'=>'Extension', 'path'=>'Network.extension', 'min'=>0, 'max'=>Float::INFINITY},
59
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Network.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
60
+ 'address' => {'type'=>'string', 'path'=>'Network.address', 'min'=>0, 'max'=>1},
61
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/network-type'=>['1', '2', '3', '4', '5']}, 'type'=>'code', 'path'=>'Network.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/network-type'}}
62
+ }
63
+
64
+ attr_accessor :id # 0-1 id
65
+ attr_accessor :extension # 0-* [ Extension ]
66
+ attr_accessor :modifierExtension # 0-* [ Extension ]
67
+ attr_accessor :address # 0-1 string
68
+ attr_accessor :type # 0-1 code
69
+ end
70
+
71
+ attr_accessor :id # 0-1 id
72
+ attr_accessor :extension # 0-* [ Extension ]
73
+ attr_accessor :modifierExtension # 0-* [ Extension ]
74
+ attr_accessor :role # 0-* [ CodeableConcept ]
75
+ attr_accessor :reference # 0-1 Reference(Practitioner|Organization|Device|Patient|RelatedPerson)
76
+ attr_accessor :userId # 0-1 Identifier
77
+ attr_accessor :altId # 0-1 string
78
+ attr_accessor :name # 0-1 string
79
+ attr_accessor :requestor # 1-1 boolean
80
+ attr_accessor :location # 0-1 Reference(Location)
81
+ attr_accessor :policy # 0-* [ uri ]
82
+ attr_accessor :media # 0-1 Coding
83
+ attr_accessor :network # 0-1 AuditEvent::Agent::Network
84
+ attr_accessor :purposeOfUse # 0-* [ Coding ]
85
+ end
86
+
87
+ class Source < FHIR::Model
88
+ include FHIR::Hashable
89
+ include FHIR::Json
90
+ include FHIR::Xml
91
+
92
+ METADATA = {
93
+ 'id' => {'type'=>'id', 'path'=>'Source.id', 'min'=>0, 'max'=>1},
94
+ 'extension' => {'type'=>'Extension', 'path'=>'Source.extension', 'min'=>0, 'max'=>Float::INFINITY},
95
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Source.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
96
+ 'site' => {'type'=>'string', 'path'=>'Source.site', 'min'=>0, 'max'=>1},
97
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Source.identifier', 'min'=>1, 'max'=>1},
98
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/security-source-type'=>['1', '2', '3', '4', '5', '6', '7', '8', '9']}, 'type'=>'Coding', 'path'=>'Source.type', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/audit-source-type'}}
99
+ }
100
+
101
+ attr_accessor :id # 0-1 id
102
+ attr_accessor :extension # 0-* [ Extension ]
103
+ attr_accessor :modifierExtension # 0-* [ Extension ]
104
+ attr_accessor :site # 0-1 string
105
+ attr_accessor :identifier # 1-1 Identifier
106
+ attr_accessor :type # 0-* [ Coding ]
107
+ end
108
+
109
+ class Entity < FHIR::Model
110
+ include FHIR::Hashable
111
+ include FHIR::Json
112
+ include FHIR::Xml
113
+
114
+ METADATA = {
115
+ 'id' => {'type'=>'id', 'path'=>'Entity.id', 'min'=>0, 'max'=>1},
116
+ 'extension' => {'type'=>'Extension', 'path'=>'Entity.extension', 'min'=>0, 'max'=>Float::INFINITY},
117
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Entity.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
118
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Entity.identifier', 'min'=>0, 'max'=>1},
119
+ 'reference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Entity.reference', 'min'=>0, 'max'=>1},
120
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/object-type'=>['1', '2', '3', '4']}, 'type'=>'Coding', 'path'=>'Entity.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/object-type'}},
121
+ 'role' => {'valid_codes'=>{'http://hl7.org/fhir/object-role'=>['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24']}, 'type'=>'Coding', 'path'=>'Entity.role', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/object-role'}},
122
+ 'lifecycle' => {'valid_codes'=>{'http://hl7.org/fhir/object-lifecycle'=>['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15']}, 'type'=>'Coding', 'path'=>'Entity.lifecycle', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/object-lifecycle'}},
123
+ 'securityLabel' => {'valid_codes'=>{'http://hl7.org/fhir/v3/Confidentiality'=>['_Confidentiality', 'L', 'M', 'N', 'R', 'U', 'V', 'B', 'D', 'I', 'ETH', 'HIV', 'PSY', 'SDV', 'C', 'S', 'T'], 'http://hl7.org/fhir/v3/ActCode'=>['_InformationSensitivityPolicy', '_ActInformationSensitivityPolicy', 'ETH', 'GDIS', 'HIV', 'PSY', 'SCA', 'SDV', 'SEX', 'STD', 'TBOO', 'SICKLE', '_EntitySensitivityPolicyType', 'DEMO', 'DOB', 'GENDER', 'LIVARG', 'MARST', 'RACE', 'REL', '_RoleInformationSensitivityPolicy', 'B', 'EMPL', 'LOCIS', 'SSP', 'ADOL', 'CEL', 'DIA', 'DRGIS', 'EMP', 'PDS', 'PRS', 'COMPT', 'HRCOMPT', 'RESCOMPT', 'RMGTCOMPT', 'SecurityPolicy', 'ObligationPolicy', 'ANONY', 'AOD', 'AUDIT', 'AUDTR', 'CPLYCC', 'CPLYCD', 'CPLYJPP', 'CPLYOPP', 'CPLYOSP', 'CPLYPOL', 'DEID', 'DELAU', 'ENCRYPT', 'ENCRYPTR', 'ENCRYPTT', 'ENCRYPTU', 'HUAPRV', 'MASK', 'MINEC', 'PRIVMARK', 'PSEUD', 'REDACT', 'RefrainPolicy', 'NOAUTH', 'NOCOLLECT', 'NODSCLCD', 'NODSCLCDS', 'NOINTEGRATE', 'NOLIST', 'NOMOU', 'NOORGPOL', 'NOPAT', 'NOPERSISTP', 'NORDSCLCD', 'NORDSCLCDS', 'NORDSCLW', 'NORELINK', 'NOREUSE', 'NOVIP', 'ORCON'], 'http://hl7.org/fhir/v3/ObservationValue'=>['_SECALTINTOBV', 'ABSTRED', 'AGGRED', 'ANONYED', 'MAPPED', 'MASKED', 'PSEUDED', 'REDACTED', 'SUBSETTED', 'SYNTAC', 'TRSLT', 'VERSIONED', '_SECDATINTOBV', 'CRYTOHASH', 'DIGSIG', '_SECINTCONOBV', 'HRELIABLE', 'RELIABLE', 'UNCERTREL', 'UNRELIABLE', '_SECINTPRVOBV', '_SECINTPRVABOBV', 'CLINAST', 'DEVAST', 'HCPAST', 'PACQAST', 'PATAST', 'PAYAST', 'PROAST', 'SDMAST', '_SECINTPRVRBOBV', 'CLINRPT', 'DEVRPT', 'HCPRPT', 'PACQRPT', 'PATRPT', 'PAYRPT', 'PRORPT', 'SDMRPT'], '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'], 'http://hl7.org/fhir/v3/ActUSPrivacyLaw'=>['_ActUSPrivacyLaw', '42CFRPart2', 'CommonRule', 'HIPAANOPP', 'HIPAAPsyNotes', 'HIPAASelfPay', 'Title38Section7332']}, 'type'=>'Coding', 'path'=>'Entity.securityLabel', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/security-labels'}},
124
+ 'name' => {'type'=>'string', 'path'=>'Entity.name', 'min'=>0, 'max'=>1},
125
+ 'description' => {'type'=>'string', 'path'=>'Entity.description', 'min'=>0, 'max'=>1},
126
+ 'query' => {'type'=>'base64Binary', 'path'=>'Entity.query', 'min'=>0, 'max'=>1},
127
+ 'detail' => {'type'=>'AuditEvent::Entity::Detail', 'path'=>'Entity.detail', 'min'=>0, 'max'=>Float::INFINITY}
128
+ }
129
+
130
+ class Detail < FHIR::Model
131
+ include FHIR::Hashable
132
+ include FHIR::Json
133
+ include FHIR::Xml
134
+
135
+ METADATA = {
136
+ 'id' => {'type'=>'id', 'path'=>'Detail.id', 'min'=>0, 'max'=>1},
137
+ 'extension' => {'type'=>'Extension', 'path'=>'Detail.extension', 'min'=>0, 'max'=>Float::INFINITY},
138
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Detail.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
139
+ 'type' => {'type'=>'string', 'path'=>'Detail.type', 'min'=>1, 'max'=>1},
140
+ 'value' => {'type'=>'base64Binary', 'path'=>'Detail.value', 'min'=>1, 'max'=>1}
141
+ }
142
+
143
+ attr_accessor :id # 0-1 id
144
+ attr_accessor :extension # 0-* [ Extension ]
145
+ attr_accessor :modifierExtension # 0-* [ Extension ]
146
+ attr_accessor :type # 1-1 string
147
+ attr_accessor :value # 1-1 base64Binary
148
+ end
149
+
150
+ attr_accessor :id # 0-1 id
151
+ attr_accessor :extension # 0-* [ Extension ]
152
+ attr_accessor :modifierExtension # 0-* [ Extension ]
153
+ attr_accessor :identifier # 0-1 Identifier
154
+ attr_accessor :reference # 0-1 Reference(Resource)
155
+ attr_accessor :type # 0-1 Coding
156
+ attr_accessor :role # 0-1 Coding
157
+ attr_accessor :lifecycle # 0-1 Coding
158
+ attr_accessor :securityLabel # 0-* [ Coding ]
159
+ attr_accessor :name # 0-1 string
160
+ attr_accessor :description # 0-1 string
161
+ attr_accessor :query # 0-1 base64Binary
162
+ attr_accessor :detail # 0-* [ AuditEvent::Entity::Detail ]
163
+ end
164
+
165
+ attr_accessor :id # 0-1 id
166
+ attr_accessor :meta # 0-1 Meta
167
+ attr_accessor :implicitRules # 0-1 uri
168
+ attr_accessor :language # 0-1 code
169
+ attr_accessor :text # 0-1 Narrative
170
+ attr_accessor :contained # 0-* [ Resource ]
171
+ attr_accessor :extension # 0-* [ Extension ]
172
+ attr_accessor :modifierExtension # 0-* [ Extension ]
173
+ attr_accessor :type # 1-1 Coding
174
+ attr_accessor :subtype # 0-* [ Coding ]
175
+ attr_accessor :action # 0-1 code
176
+ attr_accessor :recorded # 1-1 instant
177
+ attr_accessor :outcome # 0-1 code
178
+ attr_accessor :outcomeDesc # 0-1 string
179
+ attr_accessor :purposeOfEvent # 0-* [ Coding ]
180
+ attr_accessor :agent # 1-* [ AuditEvent::Agent ]
181
+ attr_accessor :source # 1-1 AuditEvent::Source
182
+ attr_accessor :entity # 0-* [ AuditEvent::Entity ]
183
+
184
+ def resourceType
185
+ 'AuditEvent'
186
+ end
187
+ end
188
+ end
@@ -0,0 +1,42 @@
1
+ module FHIR
2
+ class Basic < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["author", "code", "created", "identifier", "patient", "subject"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'Basic.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'Basic.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'Basic.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'Basic.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'Basic.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'Basic.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'Basic.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Basic.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'identifier' => {'type'=>'Identifier', 'path'=>'Basic.identifier', 'min'=>0, 'max'=>Float::INFINITY},
18
+ 'code' => {'valid_codes'=>{'http://hl7.org/fhir/basic-resource-type'=>['consent', 'referral', 'advevent', 'aptmtreq', 'transfer', 'diet', 'adminact', 'exposure', 'investigation', 'account', 'invoice', 'adjudicat', 'predetreq', 'predetermine', 'study', 'protocol']}, 'type'=>'CodeableConcept', 'path'=>'Basic.code', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/basic-resource-type'}},
19
+ 'subject' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Basic.subject', 'min'=>0, 'max'=>1},
20
+ 'created' => {'type'=>'date', 'path'=>'Basic.created', 'min'=>0, 'max'=>1},
21
+ 'author' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson'], 'type'=>'Reference', 'path'=>'Basic.author', 'min'=>0, 'max'=>1}
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 :identifier # 0-* [ Identifier ]
33
+ attr_accessor :code # 1-1 CodeableConcept
34
+ attr_accessor :subject # 0-1 Reference(Resource)
35
+ attr_accessor :created # 0-1 date
36
+ attr_accessor :author # 0-1 Reference(Practitioner|Patient|RelatedPerson)
37
+
38
+ def resourceType
39
+ 'Basic'
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,28 @@
1
+ module FHIR
2
+ class Binary < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["contenttype"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'Binary.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'Binary.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'Binary.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'Binary.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'contentType' => {'type'=>'code', 'path'=>'Binary.contentType', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://www.rfc-editor.org/bcp/bcp13.txt'}},
14
+ 'content' => {'type'=>'base64Binary', 'path'=>'Binary.content', 'min'=>1, 'max'=>1}
15
+ }
16
+
17
+ attr_accessor :id # 0-1 id
18
+ attr_accessor :meta # 0-1 Meta
19
+ attr_accessor :implicitRules # 0-1 uri
20
+ attr_accessor :language # 0-1 code
21
+ attr_accessor :contentType # 1-1 code
22
+ attr_accessor :content # 1-1 base64Binary
23
+
24
+ def resourceType
25
+ 'Binary'
26
+ end
27
+ end
28
+ end