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,74 @@
1
+ module FHIR
2
+ class DeviceComponent < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["parent", "source", "type"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'DeviceComponent.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'DeviceComponent.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'DeviceComponent.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'DeviceComponent.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'DeviceComponent.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'DeviceComponent.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'DeviceComponent.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'DeviceComponent.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'type' => {'type'=>'CodeableConcept', 'path'=>'DeviceComponent.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'preferred', 'uri'=>'https://rtmms.nist.gov/rtmms/index.htm#!hrosetta'}},
18
+ 'identifier' => {'type'=>'Identifier', 'path'=>'DeviceComponent.identifier', 'min'=>1, 'max'=>1},
19
+ 'lastSystemChange' => {'type'=>'instant', 'path'=>'DeviceComponent.lastSystemChange', 'min'=>1, 'max'=>1},
20
+ 'source' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'DeviceComponent.source', 'min'=>0, 'max'=>1},
21
+ 'parent' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/DeviceComponent'], 'type'=>'Reference', 'path'=>'DeviceComponent.parent', 'min'=>0, 'max'=>1},
22
+ 'operationalStatus' => {'type'=>'CodeableConcept', 'path'=>'DeviceComponent.operationalStatus', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>nil}},
23
+ 'parameterGroup' => {'type'=>'CodeableConcept', 'path'=>'DeviceComponent.parameterGroup', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>nil}},
24
+ 'measurementPrinciple' => {'valid_codes'=>{'http://hl7.org/fhir/measurement-principle'=>['other', 'chemical', 'electrical', 'impedance', 'nuclear', 'optical', 'thermal', 'biological', 'mechanical', 'acoustical', 'manual']}, 'type'=>'code', 'path'=>'DeviceComponent.measurementPrinciple', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/measurement-principle'}},
25
+ 'productionSpecification' => {'type'=>'DeviceComponent::Productionspecification', 'path'=>'DeviceComponent.productionSpecification', 'min'=>0, 'max'=>Float::INFINITY},
26
+ 'languageCode' => {'type'=>'CodeableConcept', 'path'=>'DeviceComponent.languageCode', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}}
27
+ }
28
+
29
+ class Productionspecification < FHIR::Model
30
+ include FHIR::Hashable
31
+ include FHIR::Json
32
+ include FHIR::Xml
33
+
34
+ METADATA = {
35
+ 'id' => {'type'=>'id', 'path'=>'Productionspecification.id', 'min'=>0, 'max'=>1},
36
+ 'extension' => {'type'=>'Extension', 'path'=>'Productionspecification.extension', 'min'=>0, 'max'=>Float::INFINITY},
37
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Productionspecification.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
38
+ 'specType' => {'type'=>'CodeableConcept', 'path'=>'Productionspecification.specType', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>nil}},
39
+ 'componentId' => {'type'=>'Identifier', 'path'=>'Productionspecification.componentId', 'min'=>0, 'max'=>1},
40
+ 'productionSpec' => {'type'=>'string', 'path'=>'Productionspecification.productionSpec', 'min'=>0, 'max'=>1}
41
+ }
42
+
43
+ attr_accessor :id # 0-1 id
44
+ attr_accessor :extension # 0-* [ Extension ]
45
+ attr_accessor :modifierExtension # 0-* [ Extension ]
46
+ attr_accessor :specType # 0-1 CodeableConcept
47
+ attr_accessor :componentId # 0-1 Identifier
48
+ attr_accessor :productionSpec # 0-1 string
49
+ end
50
+
51
+ attr_accessor :id # 0-1 id
52
+ attr_accessor :meta # 0-1 Meta
53
+ attr_accessor :implicitRules # 0-1 uri
54
+ attr_accessor :language # 0-1 code
55
+ attr_accessor :text # 0-1 Narrative
56
+ attr_accessor :contained # 0-* [ Resource ]
57
+ attr_accessor :extension # 0-* [ Extension ]
58
+ attr_accessor :modifierExtension # 0-* [ Extension ]
59
+ attr_accessor :type # 1-1 CodeableConcept
60
+ attr_accessor :identifier # 1-1 Identifier
61
+ attr_accessor :lastSystemChange # 1-1 instant
62
+ attr_accessor :source # 0-1 Reference(Device)
63
+ attr_accessor :parent # 0-1 Reference(DeviceComponent)
64
+ attr_accessor :operationalStatus # 0-* [ CodeableConcept ]
65
+ attr_accessor :parameterGroup # 0-1 CodeableConcept
66
+ attr_accessor :measurementPrinciple # 0-1 code
67
+ attr_accessor :productionSpecification # 0-* [ DeviceComponent::Productionspecification ]
68
+ attr_accessor :languageCode # 0-1 CodeableConcept
69
+
70
+ def resourceType
71
+ 'DeviceComponent'
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,74 @@
1
+ module FHIR
2
+ class DeviceMetric < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ SEARCH_PARAMS = ["category", "identifier", "parent", "source", "type"]
8
+ METADATA = {
9
+ 'id' => {'type'=>'id', 'path'=>'DeviceMetric.id', 'min'=>0, 'max'=>1},
10
+ 'meta' => {'type'=>'Meta', 'path'=>'DeviceMetric.meta', 'min'=>0, 'max'=>1},
11
+ 'implicitRules' => {'type'=>'uri', 'path'=>'DeviceMetric.implicitRules', 'min'=>0, 'max'=>1},
12
+ 'language' => {'type'=>'code', 'path'=>'DeviceMetric.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
13
+ 'text' => {'type'=>'Narrative', 'path'=>'DeviceMetric.text', 'min'=>0, 'max'=>1},
14
+ 'contained' => {'type'=>'Resource', 'path'=>'DeviceMetric.contained', 'min'=>0, 'max'=>Float::INFINITY},
15
+ 'extension' => {'type'=>'Extension', 'path'=>'DeviceMetric.extension', 'min'=>0, 'max'=>Float::INFINITY},
16
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'DeviceMetric.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
17
+ 'type' => {'type'=>'CodeableConcept', 'path'=>'DeviceMetric.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'preferred', 'uri'=>'https://rtmms.nist.gov/rtmms/index.htm#!hrosetta'}},
18
+ 'identifier' => {'type'=>'Identifier', 'path'=>'DeviceMetric.identifier', 'min'=>1, 'max'=>1},
19
+ 'unit' => {'type'=>'CodeableConcept', 'path'=>'DeviceMetric.unit', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'preferred', 'uri'=>'https://rtmms.nist.gov/rtmms/index.htm#!units'}},
20
+ 'source' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'DeviceMetric.source', 'min'=>0, 'max'=>1},
21
+ 'parent' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/DeviceComponent'], 'type'=>'Reference', 'path'=>'DeviceMetric.parent', 'min'=>0, 'max'=>1},
22
+ 'operationalStatus' => {'valid_codes'=>{'http://hl7.org/fhir/metric-operational-status'=>['on', 'off', 'standby']}, 'type'=>'code', 'path'=>'DeviceMetric.operationalStatus', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/metric-operational-status'}},
23
+ 'color' => {'valid_codes'=>{'http://hl7.org/fhir/metric-color'=>['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']}, 'type'=>'code', 'path'=>'DeviceMetric.color', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/metric-color'}},
24
+ 'category' => {'valid_codes'=>{'http://hl7.org/fhir/metric-category'=>['measurement', 'setting', 'calculation', 'unspecified']}, 'type'=>'code', 'path'=>'DeviceMetric.category', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/metric-category'}},
25
+ 'measurementPeriod' => {'type'=>'Timing', 'path'=>'DeviceMetric.measurementPeriod', 'min'=>0, 'max'=>1},
26
+ 'calibration' => {'type'=>'DeviceMetric::Calibration', 'path'=>'DeviceMetric.calibration', 'min'=>0, 'max'=>Float::INFINITY}
27
+ }
28
+
29
+ class Calibration < FHIR::Model
30
+ include FHIR::Hashable
31
+ include FHIR::Json
32
+ include FHIR::Xml
33
+
34
+ METADATA = {
35
+ 'id' => {'type'=>'id', 'path'=>'Calibration.id', 'min'=>0, 'max'=>1},
36
+ 'extension' => {'type'=>'Extension', 'path'=>'Calibration.extension', 'min'=>0, 'max'=>Float::INFINITY},
37
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'Calibration.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
38
+ 'type' => {'valid_codes'=>{'http://hl7.org/fhir/metric-calibration-type'=>['unspecified', 'offset', 'gain', 'two-point']}, 'type'=>'code', 'path'=>'Calibration.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/metric-calibration-type'}},
39
+ 'state' => {'valid_codes'=>{'http://hl7.org/fhir/metric-calibration-state'=>['not-calibrated', 'calibration-required', 'calibrated', 'unspecified']}, 'type'=>'code', 'path'=>'Calibration.state', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/metric-calibration-state'}},
40
+ 'time' => {'type'=>'instant', 'path'=>'Calibration.time', 'min'=>0, 'max'=>1}
41
+ }
42
+
43
+ attr_accessor :id # 0-1 id
44
+ attr_accessor :extension # 0-* [ Extension ]
45
+ attr_accessor :modifierExtension # 0-* [ Extension ]
46
+ attr_accessor :type # 0-1 code
47
+ attr_accessor :state # 0-1 code
48
+ attr_accessor :time # 0-1 instant
49
+ end
50
+
51
+ attr_accessor :id # 0-1 id
52
+ attr_accessor :meta # 0-1 Meta
53
+ attr_accessor :implicitRules # 0-1 uri
54
+ attr_accessor :language # 0-1 code
55
+ attr_accessor :text # 0-1 Narrative
56
+ attr_accessor :contained # 0-* [ Resource ]
57
+ attr_accessor :extension # 0-* [ Extension ]
58
+ attr_accessor :modifierExtension # 0-* [ Extension ]
59
+ attr_accessor :type # 1-1 CodeableConcept
60
+ attr_accessor :identifier # 1-1 Identifier
61
+ attr_accessor :unit # 0-1 CodeableConcept
62
+ attr_accessor :source # 0-1 Reference(Device)
63
+ attr_accessor :parent # 0-1 Reference(DeviceComponent)
64
+ attr_accessor :operationalStatus # 0-1 code
65
+ attr_accessor :color # 0-1 code
66
+ attr_accessor :category # 1-1 code
67
+ attr_accessor :measurementPeriod # 0-1 Timing
68
+ attr_accessor :calibration # 0-* [ DeviceMetric::Calibration ]
69
+
70
+ def resourceType
71
+ 'DeviceMetric'
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,68 @@
1
+ module FHIR
2
+ class DeviceUseRequest < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ MULTIPLE_TYPES = {
8
+ 'bodySite' => ['CodeableConcept', 'Reference'],
9
+ 'timing' => ['Timing', 'Period', 'dateTime']
10
+ }
11
+ SEARCH_PARAMS = ["device", "patient", "subject"]
12
+ METADATA = {
13
+ 'id' => {'type'=>'id', 'path'=>'DeviceUseRequest.id', 'min'=>0, 'max'=>1},
14
+ 'meta' => {'type'=>'Meta', 'path'=>'DeviceUseRequest.meta', 'min'=>0, 'max'=>1},
15
+ 'implicitRules' => {'type'=>'uri', 'path'=>'DeviceUseRequest.implicitRules', 'min'=>0, 'max'=>1},
16
+ 'language' => {'type'=>'code', 'path'=>'DeviceUseRequest.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
17
+ 'text' => {'type'=>'Narrative', 'path'=>'DeviceUseRequest.text', 'min'=>0, 'max'=>1},
18
+ 'contained' => {'type'=>'Resource', 'path'=>'DeviceUseRequest.contained', 'min'=>0, 'max'=>Float::INFINITY},
19
+ 'extension' => {'type'=>'Extension', 'path'=>'DeviceUseRequest.extension', 'min'=>0, 'max'=>Float::INFINITY},
20
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'DeviceUseRequest.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
21
+ 'bodySiteCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'DeviceUseRequest.bodySite[x]', 'min'=>0, 'max'=>1},
22
+ 'bodySiteReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/BodySite'], 'type'=>'Reference', 'path'=>'DeviceUseRequest.bodySite[x]', 'min'=>0, 'max'=>1},
23
+ 'status' => {'valid_codes'=>{'http://hl7.org/fhir/device-use-request-status'=>['proposed', 'planned', 'requested', 'received', 'accepted', 'in-progress', 'completed', 'suspended', 'rejected', 'aborted']}, 'type'=>'code', 'path'=>'DeviceUseRequest.status', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/device-use-request-status'}},
24
+ 'device' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'DeviceUseRequest.device', 'min'=>1, 'max'=>1},
25
+ 'encounter' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Encounter'], 'type'=>'Reference', 'path'=>'DeviceUseRequest.encounter', 'min'=>0, 'max'=>1},
26
+ 'identifier' => {'type'=>'Identifier', 'path'=>'DeviceUseRequest.identifier', 'min'=>0, 'max'=>Float::INFINITY},
27
+ 'indication' => {'type'=>'CodeableConcept', 'path'=>'DeviceUseRequest.indication', 'min'=>0, 'max'=>Float::INFINITY},
28
+ 'notes' => {'type'=>'string', 'path'=>'DeviceUseRequest.notes', 'min'=>0, 'max'=>Float::INFINITY},
29
+ 'prnReason' => {'type'=>'CodeableConcept', 'path'=>'DeviceUseRequest.prnReason', 'min'=>0, 'max'=>Float::INFINITY},
30
+ 'orderedOn' => {'type'=>'dateTime', 'path'=>'DeviceUseRequest.orderedOn', 'min'=>0, 'max'=>1},
31
+ 'recordedOn' => {'type'=>'dateTime', 'path'=>'DeviceUseRequest.recordedOn', 'min'=>0, 'max'=>1},
32
+ 'subject' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'DeviceUseRequest.subject', 'min'=>1, 'max'=>1},
33
+ 'timingTiming' => {'type'=>'Timing', 'path'=>'DeviceUseRequest.timing[x]', 'min'=>0, 'max'=>1},
34
+ 'timingPeriod' => {'type'=>'Period', 'path'=>'DeviceUseRequest.timing[x]', 'min'=>0, 'max'=>1},
35
+ 'timingDateTime' => {'type'=>'dateTime', 'path'=>'DeviceUseRequest.timing[x]', 'min'=>0, 'max'=>1},
36
+ 'priority' => {'valid_codes'=>{'http://hl7.org/fhir/device-use-request-priority'=>['routine', 'urgent', 'stat', 'asap']}, 'type'=>'code', 'path'=>'DeviceUseRequest.priority', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/device-use-request-priority'}}
37
+ }
38
+
39
+ attr_accessor :id # 0-1 id
40
+ attr_accessor :meta # 0-1 Meta
41
+ attr_accessor :implicitRules # 0-1 uri
42
+ attr_accessor :language # 0-1 code
43
+ attr_accessor :text # 0-1 Narrative
44
+ attr_accessor :contained # 0-* [ Resource ]
45
+ attr_accessor :extension # 0-* [ Extension ]
46
+ attr_accessor :modifierExtension # 0-* [ Extension ]
47
+ attr_accessor :bodySiteCodeableConcept # 0-1 CodeableConcept
48
+ attr_accessor :bodySiteReference # 0-1 Reference(BodySite)
49
+ attr_accessor :status # 0-1 code
50
+ attr_accessor :device # 1-1 Reference(Device)
51
+ attr_accessor :encounter # 0-1 Reference(Encounter)
52
+ attr_accessor :identifier # 0-* [ Identifier ]
53
+ attr_accessor :indication # 0-* [ CodeableConcept ]
54
+ attr_accessor :notes # 0-* [ string ]
55
+ attr_accessor :prnReason # 0-* [ CodeableConcept ]
56
+ attr_accessor :orderedOn # 0-1 dateTime
57
+ attr_accessor :recordedOn # 0-1 dateTime
58
+ attr_accessor :subject # 1-1 Reference(Patient)
59
+ attr_accessor :timingTiming # 0-1 Timing
60
+ attr_accessor :timingPeriod # 0-1 Period
61
+ attr_accessor :timingDateTime # 0-1 dateTime
62
+ attr_accessor :priority # 0-1 code
63
+
64
+ def resourceType
65
+ 'DeviceUseRequest'
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,60 @@
1
+ module FHIR
2
+ class DeviceUseStatement < FHIR::Model
3
+ include FHIR::Hashable
4
+ include FHIR::Json
5
+ include FHIR::Xml
6
+
7
+ MULTIPLE_TYPES = {
8
+ 'bodySite' => ['CodeableConcept', 'Reference'],
9
+ 'timing' => ['Timing', 'Period', 'dateTime']
10
+ }
11
+ SEARCH_PARAMS = ["device", "patient", "subject"]
12
+ METADATA = {
13
+ 'id' => {'type'=>'id', 'path'=>'DeviceUseStatement.id', 'min'=>0, 'max'=>1},
14
+ 'meta' => {'type'=>'Meta', 'path'=>'DeviceUseStatement.meta', 'min'=>0, 'max'=>1},
15
+ 'implicitRules' => {'type'=>'uri', 'path'=>'DeviceUseStatement.implicitRules', 'min'=>0, 'max'=>1},
16
+ 'language' => {'type'=>'code', 'path'=>'DeviceUseStatement.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://tools.ietf.org/html/bcp47'}},
17
+ 'text' => {'type'=>'Narrative', 'path'=>'DeviceUseStatement.text', 'min'=>0, 'max'=>1},
18
+ 'contained' => {'type'=>'Resource', 'path'=>'DeviceUseStatement.contained', 'min'=>0, 'max'=>Float::INFINITY},
19
+ 'extension' => {'type'=>'Extension', 'path'=>'DeviceUseStatement.extension', 'min'=>0, 'max'=>Float::INFINITY},
20
+ 'modifierExtension' => {'type'=>'Extension', 'path'=>'DeviceUseStatement.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
21
+ 'bodySiteCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'DeviceUseStatement.bodySite[x]', 'min'=>0, 'max'=>1},
22
+ 'bodySiteReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/BodySite'], 'type'=>'Reference', 'path'=>'DeviceUseStatement.bodySite[x]', 'min'=>0, 'max'=>1},
23
+ 'whenUsed' => {'type'=>'Period', 'path'=>'DeviceUseStatement.whenUsed', 'min'=>0, 'max'=>1},
24
+ 'device' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'DeviceUseStatement.device', 'min'=>1, 'max'=>1},
25
+ 'identifier' => {'type'=>'Identifier', 'path'=>'DeviceUseStatement.identifier', 'min'=>0, 'max'=>Float::INFINITY},
26
+ 'indication' => {'type'=>'CodeableConcept', 'path'=>'DeviceUseStatement.indication', 'min'=>0, 'max'=>Float::INFINITY},
27
+ 'notes' => {'type'=>'string', 'path'=>'DeviceUseStatement.notes', 'min'=>0, 'max'=>Float::INFINITY},
28
+ 'recordedOn' => {'type'=>'dateTime', 'path'=>'DeviceUseStatement.recordedOn', 'min'=>0, 'max'=>1},
29
+ 'subject' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'DeviceUseStatement.subject', 'min'=>1, 'max'=>1},
30
+ 'timingTiming' => {'type'=>'Timing', 'path'=>'DeviceUseStatement.timing[x]', 'min'=>0, 'max'=>1},
31
+ 'timingPeriod' => {'type'=>'Period', 'path'=>'DeviceUseStatement.timing[x]', 'min'=>0, 'max'=>1},
32
+ 'timingDateTime' => {'type'=>'dateTime', 'path'=>'DeviceUseStatement.timing[x]', 'min'=>0, 'max'=>1}
33
+ }
34
+
35
+ attr_accessor :id # 0-1 id
36
+ attr_accessor :meta # 0-1 Meta
37
+ attr_accessor :implicitRules # 0-1 uri
38
+ attr_accessor :language # 0-1 code
39
+ attr_accessor :text # 0-1 Narrative
40
+ attr_accessor :contained # 0-* [ Resource ]
41
+ attr_accessor :extension # 0-* [ Extension ]
42
+ attr_accessor :modifierExtension # 0-* [ Extension ]
43
+ attr_accessor :bodySiteCodeableConcept # 0-1 CodeableConcept
44
+ attr_accessor :bodySiteReference # 0-1 Reference(BodySite)
45
+ attr_accessor :whenUsed # 0-1 Period
46
+ attr_accessor :device # 1-1 Reference(Device)
47
+ attr_accessor :identifier # 0-* [ Identifier ]
48
+ attr_accessor :indication # 0-* [ CodeableConcept ]
49
+ attr_accessor :notes # 0-* [ string ]
50
+ attr_accessor :recordedOn # 0-1 dateTime
51
+ attr_accessor :subject # 1-1 Reference(Patient)
52
+ attr_accessor :timingTiming # 0-1 Timing
53
+ attr_accessor :timingPeriod # 0-1 Period
54
+ attr_accessor :timingDateTime # 0-1 dateTime
55
+
56
+ def resourceType
57
+ 'DeviceUseStatement'
58
+ end
59
+ end
60
+ end