fhir_models 1.8.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fhir_models/bootstrap/definitions.rb +1 -1
  3. data/lib/fhir_models/bootstrap/generator.rb +1 -1
  4. data/lib/fhir_models/bootstrap/template.rb +1 -1
  5. data/lib/fhir_models/examples/json/claim-example-vision-glasses.json +1 -1
  6. data/lib/fhir_models/examples/json/claimresponse-example.json +1 -1
  7. data/lib/fhir_models/examples/json/conceptmap-example-specimen-type.json +1 -3
  8. data/lib/fhir_models/examples/json/eligibilityresponse-example-benefits.json +1 -1
  9. data/lib/fhir_models/examples/json/eligibilityresponse-example.json +1 -1
  10. data/lib/fhir_models/examples/json/enrollmentresponse-example.json +1 -1
  11. data/lib/fhir_models/examples/json/paymentreconciliation-example.json +1 -1
  12. data/lib/fhir_models/examples/xml/claim-example-vision-glasses.xml +1 -1
  13. data/lib/fhir_models/examples/xml/claimresponse-example.xml +1 -1
  14. data/lib/fhir_models/examples/xml/conceptmap-example-specimen-type.xml +1 -3
  15. data/lib/fhir_models/examples/xml/eligibilityresponse-example-benefits.xml +1 -1
  16. data/lib/fhir_models/examples/xml/eligibilityresponse-example.xml +1 -1
  17. data/lib/fhir_models/examples/xml/enrollmentresponse-example.xml +1 -1
  18. data/lib/fhir_models/examples/xml/paymentreconciliation-example.xml +1 -1
  19. data/lib/fhir_models/fhir/metadata.rb +2 -2
  20. data/lib/fhir_models/fhir/resources/Account.rb +9 -9
  21. data/lib/fhir_models/fhir/resources/ActivityDefinition.rb +9 -9
  22. data/lib/fhir_models/fhir/resources/AllergyIntolerance.rb +7 -7
  23. data/lib/fhir_models/fhir/resources/Appointment.rb +5 -5
  24. data/lib/fhir_models/fhir/resources/AppointmentResponse.rb +5 -5
  25. data/lib/fhir_models/fhir/resources/AuditEvent.rb +7 -7
  26. data/lib/fhir_models/fhir/resources/Basic.rb +5 -5
  27. data/lib/fhir_models/fhir/resources/Binary.rb +3 -3
  28. data/lib/fhir_models/fhir/resources/BodySite.rb +3 -3
  29. data/lib/fhir_models/fhir/resources/Bundle.rb +1 -1
  30. data/lib/fhir_models/fhir/resources/CapabilityStatement.rb +13 -13
  31. data/lib/fhir_models/fhir/resources/CarePlan.rb +35 -35
  32. data/lib/fhir_models/fhir/resources/CareTeam.rb +7 -7
  33. data/lib/fhir_models/fhir/resources/Claim.rb +45 -45
  34. data/lib/fhir_models/fhir/resources/ClaimResponse.rb +15 -15
  35. data/lib/fhir_models/fhir/resources/ClinicalImpression.rb +19 -19
  36. data/lib/fhir_models/fhir/resources/CodeSystem.rb +1 -1
  37. data/lib/fhir_models/fhir/resources/Communication.rb +17 -17
  38. data/lib/fhir_models/fhir/resources/CommunicationRequest.rb +15 -15
  39. data/lib/fhir_models/fhir/resources/CompartmentDefinition.rb +1 -1
  40. data/lib/fhir_models/fhir/resources/Composition.rb +15 -15
  41. data/lib/fhir_models/fhir/resources/ConceptMap.rb +5 -5
  42. data/lib/fhir_models/fhir/resources/Condition.rb +11 -11
  43. data/lib/fhir_models/fhir/resources/Consent.rb +15 -15
  44. data/lib/fhir_models/fhir/resources/Contract.rb +29 -29
  45. data/lib/fhir_models/fhir/resources/Coverage.rb +11 -11
  46. data/lib/fhir_models/fhir/resources/DataElement.rb +1 -1
  47. data/lib/fhir_models/fhir/resources/DetectedIssue.rb +9 -9
  48. data/lib/fhir_models/fhir/resources/Device.rb +7 -7
  49. data/lib/fhir_models/fhir/resources/DeviceComponent.rb +5 -5
  50. data/lib/fhir_models/fhir/resources/DeviceMetric.rb +5 -5
  51. data/lib/fhir_models/fhir/resources/DeviceUseRequest.rb +23 -23
  52. data/lib/fhir_models/fhir/resources/DeviceUseStatement.rb +5 -5
  53. data/lib/fhir_models/fhir/resources/DiagnosticReport.rb +17 -17
  54. data/lib/fhir_models/fhir/resources/DiagnosticRequest.rb +21 -21
  55. data/lib/fhir_models/fhir/resources/DocumentManifest.rb +11 -11
  56. data/lib/fhir_models/fhir/resources/DocumentReference.rb +17 -17
  57. data/lib/fhir_models/fhir/resources/DomainResource.rb +1 -1
  58. data/lib/fhir_models/fhir/resources/EligibilityRequest.rb +15 -15
  59. data/lib/fhir_models/fhir/resources/EligibilityResponse.rb +13 -13
  60. data/lib/fhir_models/fhir/resources/Encounter.rb +29 -29
  61. data/lib/fhir_models/fhir/resources/Endpoint.rb +3 -3
  62. data/lib/fhir_models/fhir/resources/EnrollmentRequest.rb +11 -11
  63. data/lib/fhir_models/fhir/resources/EnrollmentResponse.rb +9 -9
  64. data/lib/fhir_models/fhir/resources/EpisodeOfCare.rb +15 -15
  65. data/lib/fhir_models/fhir/resources/ExpansionProfile.rb +1 -1
  66. data/lib/fhir_models/fhir/resources/ExplanationOfBenefit.rb +47 -47
  67. data/lib/fhir_models/fhir/resources/FamilyMemberHistory.rb +3 -3
  68. data/lib/fhir_models/fhir/resources/Flag.rb +7 -7
  69. data/lib/fhir_models/fhir/resources/Goal.rb +9 -9
  70. data/lib/fhir_models/fhir/resources/Group.rb +3 -3
  71. data/lib/fhir_models/fhir/resources/GuidanceResponse.rb +17 -17
  72. data/lib/fhir_models/fhir/resources/HealthcareService.rb +9 -9
  73. data/lib/fhir_models/fhir/resources/ImagingManifest.rb +7 -7
  74. data/lib/fhir_models/fhir/resources/ImagingStudy.rb +13 -13
  75. data/lib/fhir_models/fhir/resources/Immunization.rb +17 -17
  76. data/lib/fhir_models/fhir/resources/ImmunizationRecommendation.rb +9 -9
  77. data/lib/fhir_models/fhir/resources/ImplementationGuide.rb +7 -7
  78. data/lib/fhir_models/fhir/resources/Library.rb +1 -1
  79. data/lib/fhir_models/fhir/resources/Linkage.rb +3 -3
  80. data/lib/fhir_models/fhir/resources/List.rb +9 -9
  81. data/lib/fhir_models/fhir/resources/Location.rb +7 -7
  82. data/lib/fhir_models/fhir/resources/Measure.rb +3 -3
  83. data/lib/fhir_models/fhir/resources/MeasureReport.rb +15 -15
  84. data/lib/fhir_models/fhir/resources/Media.rb +5 -5
  85. data/lib/fhir_models/fhir/resources/Medication.rb +7 -7
  86. data/lib/fhir_models/fhir/resources/MedicationAdministration.rb +19 -19
  87. data/lib/fhir_models/fhir/resources/MedicationDispense.rb +21 -21
  88. data/lib/fhir_models/fhir/resources/MedicationRequest.rb +23 -23
  89. data/lib/fhir_models/fhir/resources/MedicationStatement.rb +11 -11
  90. data/lib/fhir_models/fhir/resources/MessageDefinition.rb +11 -11
  91. data/lib/fhir_models/fhir/resources/MessageHeader.rb +15 -15
  92. data/lib/fhir_models/fhir/resources/MetadataResource.rb +1 -1
  93. data/lib/fhir_models/fhir/resources/NamingSystem.rb +3 -3
  94. data/lib/fhir_models/fhir/resources/NutritionRequest.rb +9 -9
  95. data/lib/fhir_models/fhir/resources/Observation.rb +13 -13
  96. data/lib/fhir_models/fhir/resources/OperationDefinition.rb +7 -7
  97. data/lib/fhir_models/fhir/resources/OperationOutcome.rb +1 -1
  98. data/lib/fhir_models/fhir/resources/Organization.rb +5 -5
  99. data/lib/fhir_models/fhir/resources/Parameters.rb +1 -1
  100. data/lib/fhir_models/fhir/resources/Patient.rb +9 -9
  101. data/lib/fhir_models/fhir/resources/PaymentNotice.rb +11 -11
  102. data/lib/fhir_models/fhir/resources/PaymentReconciliation.rb +17 -17
  103. data/lib/fhir_models/fhir/resources/Person.rb +5 -5
  104. data/lib/fhir_models/fhir/resources/PlanDefinition.rb +7 -7
  105. data/lib/fhir_models/fhir/resources/Practitioner.rb +11 -11
  106. data/lib/fhir_models/fhir/resources/PractitionerRole.rb +11 -11
  107. data/lib/fhir_models/fhir/resources/Procedure.rb +21 -21
  108. data/lib/fhir_models/fhir/resources/ProcedureRequest.rb +13 -13
  109. data/lib/fhir_models/fhir/resources/ProcessRequest.rb +11 -11
  110. data/lib/fhir_models/fhir/resources/ProcessResponse.rb +11 -11
  111. data/lib/fhir_models/fhir/resources/Provenance.rb +11 -11
  112. data/lib/fhir_models/fhir/resources/Questionnaire.rb +7 -7
  113. data/lib/fhir_models/fhir/resources/QuestionnaireResponse.rb +19 -19
  114. data/lib/fhir_models/fhir/resources/ReferralRequest.rb +13 -13
  115. data/lib/fhir_models/fhir/resources/RelatedPerson.rb +3 -3
  116. data/lib/fhir_models/fhir/resources/RequestGroup.rb +13 -13
  117. data/lib/fhir_models/fhir/resources/ResearchStudy.rb +13 -13
  118. data/lib/fhir_models/fhir/resources/ResearchSubject.rb +7 -7
  119. data/lib/fhir_models/fhir/resources/Resource.rb +1 -1
  120. data/lib/fhir_models/fhir/resources/RiskAssessment.rb +17 -17
  121. data/lib/fhir_models/fhir/resources/Schedule.rb +3 -3
  122. data/lib/fhir_models/fhir/resources/SearchParameter.rb +3 -3
  123. data/lib/fhir_models/fhir/resources/Sequence.rb +15 -15
  124. data/lib/fhir_models/fhir/resources/ServiceDefinition.rb +3 -3
  125. data/lib/fhir_models/fhir/resources/Slot.rb +3 -3
  126. data/lib/fhir_models/fhir/resources/Specimen.rb +13 -13
  127. data/lib/fhir_models/fhir/resources/StructureDefinition.rb +1 -1
  128. data/lib/fhir_models/fhir/resources/StructureMap.rb +1 -1
  129. data/lib/fhir_models/fhir/resources/Subscription.rb +1 -1
  130. data/lib/fhir_models/fhir/resources/Substance.rb +3 -3
  131. data/lib/fhir_models/fhir/resources/SupplyDelivery.rb +11 -11
  132. data/lib/fhir_models/fhir/resources/SupplyRequest.rb +11 -11
  133. data/lib/fhir_models/fhir/resources/Task.rb +23 -23
  134. data/lib/fhir_models/fhir/resources/TestReport.rb +3 -3
  135. data/lib/fhir_models/fhir/resources/TestScript.rb +11 -11
  136. data/lib/fhir_models/fhir/resources/ValueSet.rb +1 -1
  137. data/lib/fhir_models/fhir/resources/VisionPrescription.rb +9 -9
  138. data/lib/fhir_models/fhir/types/Address.rb +1 -1
  139. data/lib/fhir_models/fhir/types/Age.rb +1 -1
  140. data/lib/fhir_models/fhir/types/Annotation.rb +3 -3
  141. data/lib/fhir_models/fhir/types/Attachment.rb +1 -1
  142. data/lib/fhir_models/fhir/types/BackboneElement.rb +1 -1
  143. data/lib/fhir_models/fhir/types/CodeableConcept.rb +1 -1
  144. data/lib/fhir_models/fhir/types/Coding.rb +1 -1
  145. data/lib/fhir_models/fhir/types/ContactDetail.rb +1 -1
  146. data/lib/fhir_models/fhir/types/ContactPoint.rb +1 -1
  147. data/lib/fhir_models/fhir/types/Contributor.rb +1 -1
  148. data/lib/fhir_models/fhir/types/Count.rb +1 -1
  149. data/lib/fhir_models/fhir/types/DataRequirement.rb +3 -3
  150. data/lib/fhir_models/fhir/types/Distance.rb +1 -1
  151. data/lib/fhir_models/fhir/types/DosageInstruction.rb +1 -1
  152. data/lib/fhir_models/fhir/types/Duration.rb +1 -1
  153. data/lib/fhir_models/fhir/types/Element.rb +1 -1
  154. data/lib/fhir_models/fhir/types/ElementDefinition.rb +3 -3
  155. data/lib/fhir_models/fhir/types/Extension.rb +1 -1
  156. data/lib/fhir_models/fhir/types/HumanName.rb +1 -1
  157. data/lib/fhir_models/fhir/types/Identifier.rb +3 -3
  158. data/lib/fhir_models/fhir/types/Meta.rb +1 -1
  159. data/lib/fhir_models/fhir/types/Money.rb +1 -1
  160. data/lib/fhir_models/fhir/types/Narrative.rb +1 -1
  161. data/lib/fhir_models/fhir/types/ParameterDefinition.rb +3 -3
  162. data/lib/fhir_models/fhir/types/Period.rb +1 -1
  163. data/lib/fhir_models/fhir/types/Quantity.rb +1 -1
  164. data/lib/fhir_models/fhir/types/Range.rb +1 -1
  165. data/lib/fhir_models/fhir/types/Ratio.rb +1 -1
  166. data/lib/fhir_models/fhir/types/Reference.rb +1 -1
  167. data/lib/fhir_models/fhir/types/RelatedArtifact.rb +3 -3
  168. data/lib/fhir_models/fhir/types/SampledData.rb +1 -1
  169. data/lib/fhir_models/fhir/types/Signature.rb +5 -5
  170. data/lib/fhir_models/fhir/types/Timing.rb +1 -1
  171. data/lib/fhir_models/fhir/types/TriggerDefinition.rb +3 -3
  172. data/lib/fhir_models/fhir/types/UsageContext.rb +1 -1
  173. data/lib/fhir_models/version.rb +1 -1
  174. metadata +2 -2
@@ -4,7 +4,7 @@ module FHIR
4
4
  include FHIR::Json
5
5
  include FHIR::Xml
6
6
 
7
- SEARCH_PARAMS = []
7
+ SEARCH_PARAMS = ['date', 'identifier', 'patient', 'category', 'participant', 'status', 'subject']
8
8
  METADATA = {
9
9
  'id' => {'type'=>'id', 'path'=>'CareTeam.id', 'min'=>0, 'max'=>1},
10
10
  'meta' => {'type'=>'Meta', 'path'=>'CareTeam.meta', 'min'=>0, 'max'=>1},
@@ -18,10 +18,10 @@ module FHIR
18
18
  'status' => {'type'=>'CodeableConcept', 'path'=>'CareTeam.status', 'min'=>0, 'max'=>1},
19
19
  'category' => {'type'=>'CodeableConcept', 'path'=>'CareTeam.category', 'min'=>0, 'max'=>Float::INFINITY},
20
20
  'name' => {'type'=>'string', 'path'=>'CareTeam.name', 'min'=>0, 'max'=>1},
21
- 'subject' => {'type'=>'Reference', 'path'=>'CareTeam.subject', 'min'=>0, 'max'=>1},
21
+ 'subject' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Group'], 'type'=>'Reference', 'path'=>'CareTeam.subject', 'min'=>0, 'max'=>1},
22
22
  'period' => {'type'=>'Period', 'path'=>'CareTeam.period', 'min'=>0, 'max'=>1},
23
23
  'participant' => {'type'=>'CareTeam::Participant', 'path'=>'CareTeam.participant', 'min'=>0, 'max'=>Float::INFINITY},
24
- 'managingOrganization' => {'type'=>'Reference', 'path'=>'CareTeam.managingOrganization', 'min'=>0, 'max'=>Float::INFINITY}
24
+ 'managingOrganization' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'CareTeam.managingOrganization', 'min'=>0, 'max'=>Float::INFINITY}
25
25
  }
26
26
 
27
27
  class Participant < FHIR::Model
@@ -34,7 +34,7 @@ module FHIR
34
34
  'extension' => {'type'=>'Extension', 'path'=>'Participant.extension', 'min'=>0, 'max'=>Float::INFINITY},
35
35
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Participant.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
36
36
  'role' => {'valid_codes'=>{'http://snomed.info/sct'=>['270002', '375005', '444000', '609005', '1354005', '2272004', '2316007', '2368000', '2481008', '2959006', '3425009', '3851003', '4577005', '6676009', '8458002', '8674003', '9306000', '9947008', '10896006', '10960006', '11286003', '11393001', '11434005', '11773006', '11993008', '12241003', '12629003', '13038009', '13157002', '13443008', '13646006', '14469008', '15130002', '17219007', '17925003', '17945006', '18205005', '18906004', '19343003', '19686009', '21093007', '21464003', '21506002', '22387007', '22573006', '22609000', '22963000', '25211005', '27508009', '27733009', '28010004', '29539002', '29644004', '29787005', '30578000', '31656007', '31831004', '33969000', '34581001', '34871008', '34972000', '38048003', '38248007', '38265003', '38312007', '39062003', '40683002', '41057000', '41795004', '41953004', '44181008', '45929001', '46363003', '47801002', '48385004', '48673000', '50058005', '50261002', '51616000', '53201003', '54056000', '55538000', '58293006', '58626002', '60614009', '62090008', '62296006', '64988008', '65412001', '65616008', '65656005', '65853000', '66089001', '66839005', '67005001', '67147004', '67822003', '68021009', '70578009', '70862002', '70924004', '72012000', '72705000', '73678001', '74128007', '74489007', '75226009', '75615008', '76022008', '76087000', '78194006', '78272007', '78652007', '78872000', '79508001', '79756005', '80386000', '80587008', '81173009', '81276006', '81467001', '81706006', '82101005', '83408003', '83420006', '83559000', '84390006', '85058002', '85411004', '85683001', '86372007', '86764008', '88510002', '89681006', '90921004', '105428002', '105429005', '105431001', '105436006', '105437002', '105438007', '105449001', '105450001', '105451002', '105452009', '105453004', '105454005', '105455006', '105456007', '105457003', '105458008', '105459000', '105460005', '105461009', '105462002', '105463007', '105464001', '105465000', '105466004', '105467008', '105468003', '105469006', '105470007', '105471006', '105472004', '105473009', '105474003', '113157001', '113158006', '113159003', '113160008', '113161007', '113163005', '116153009', '116154003', '125677006', '125678001', '125679009', '127848009', '127849001', '127850001', '127851002', '133931009', '133932002', '133933007', '133936004', '133937008', '160234004', '160498000', '160505009', '160506005', '160540005', '160542002', '160543007', '160544001', '160545000', '160549006', '160557009', '160558004', '160560002', '160562005', '160563000', '160566008', '160567004', '160772005', '161158003', '224080001', '224526002', '224527006', '224528001', '224619008', '224627004', '248544006', '255409004', '257497009', '257498004', '257499007', '257500003', '257501004', '257502006', '257503001', '257504007', '257505008', '257506009', '257508005', '257509002', '257510007', '257511006', '257512004', '257513009', '257514003', '257516001', '257517005', '257518000', '257519008', '257521003', '257522005', '257523000', '257524006', '257525007', '257526008', '262043009', '266943008', '268557009', '271448006', '276035002', '276036001', '276037005', '276119007', '303069001', '303071001', '303072008', '303073003', '303118004', '303119007', '303120001', '303121002', '303122009', '303977004', '303980003', '303981004', '303983001', '303984007', '303985008', '303986009', '303987000', '303988005', '303989002', '303990006', '303991005', '303992003', '303993008', '309456003', '309687009', '309884000', '309885004', '309886003', '310543008', '313415001', '313416000', '314712007', '314767008', '339947000', '360852005', '360863008', '360984002', '366740002', '373864002', '373929005', '385435006', '390790000', '394566006', '394567002', '394568007', '394571004', '394619001', '394738000', '394854006', '394855007', '394856008', '394857004', '394858009', '394859001', '394860006', '394861005', '394862003', '394863008', '394921008', '407542009', '407543004', '410597007', '410598002', '410599005', '410600008', '410601007', '410602000', '410603005', '410604004', '413327003', '414043009', '416034003', '416035002', '416625007', '416800000', '418119000', '419358007', '420058008', '420158005', '427568008', '427729003', '427754003', '427755002', '427874000', '427950002', '427963008', '427981006', '428024001', '428315004', '428347009', '428373004', '428376007', '428378008', '428407001', '428408006', '428410008', '428496003', '428503004', '428504005', '428506007', '428620006', '428666001', '428792000', '428801007', '428815009', '428816005', '428820009', '428821008', '429158002', '429171004', '429379008', '429509008', '429511004', '429527006', '429533002', '429534008', '429539003', '429543004', '429544005', '429545006', '429547003', '429577009', '429644000', '429708003', '429732005', '429787006', '429790000', '430098004', '430101000', '430792005', '430882007', '431549007', '433152004', '433475001', '438347000', '441463002', '441465009', '441468006', '444018008', '444052006', '444053001', '444054007', '444055008', '444145006', '444146007', '444147003', '444148008', '444168002', '444169005', '444191003', '444192005', '444193000', '444194006', '444199001', '444210007', '444211006', '444212004', '444213009', '444241008', '444242001', '444243006', '444244000', '444278006', '444279003', '444280000', '444292000', '444293005', '444294004', '444295003', '444301002', '444302009', '444303004', '444304005', '444464007', '444870008', '446654005', '450768005', '699110007', '699111006', '713176007', '713177003', '713178008', '713179000', '713183000', '713184006', '713352007', '713353002', '713369009', '715167002', '471000122100', '1421009', '3430008', '3842006', '4162009', '5275007', '6816002', '6868009', '8724009', '11661002', '11911009', '11935004', '13580004', '14698002', '17561000', '18803008', '18850004', '19244007', '20145008', '21365001', '21450003', '22515006', '22731001', '22983004', '23278007', '24430003', '24590004', '25961008', '26042002', '26369006', '28229004', '28411006', '28544002', '36682004', '37154003', '37504001', '39677007', '40127002', '40204001', '40570005', '41672002', '41904004', '43702002', '44652006', '45419001', '45440000', '45544007', '45956004', '46255001', '48740002', '49203003', '49993003', '50149000', '54503009', '56397003', '56466003', '56542007', '56545009', '57654006', '59058001', '59169001', '59944000', '60008001', '61207006', '61246008', '61345009', '61894003', '62247001', '63098009', '66476003', '66862007', '68867008', '68950000', '69280009', '71838004', '73265009', '75271001', '76166008', '76231001', '76899008', '78703002', '78729002', '79898004', '80409005', '80546007', '80584001', '80933006', '81464008', '82296001', '83189004', '83273008', '83685006', '85733003', '88189002', '88475002', '90201008', '90655003', '106289002', '106291005', '106292003', '106293008', '106294002', '106296000', '106330007', '112247003', '158965000', '158966004', '158967008', '158968003', '158969006', '158970007', '158971006', '158972004', '158973009', '158974003', '158975002', '158977005', '158978000', '158979008', '158980006', '158983008', '158984002', '158985001', '158986000', '158987009', '158988004', '158989007', '158990003', '158992006', '158993001', '158994007', '158995008', '158996009', '158997000', '158998005', '158999002', '159001001', '159002008', '159003003', '159004009', '159005005', '159006006', '159007002', '159010009', '159011008', '159012001', '159013006', '159014000', '159016003', '159017007', '159018002', '159019005', '159021000', '159022007', '159025009', '159026005', '159027001', '159028006', '159033005', '159034004', '159035003', '159036002', '159037006', '159038001', '159039009', '159040006', '159041005', '159141008', '159972006', '160008000', '224529009', '224530004', '224531000', '224532007', '224533002', '224534008', '224535009', '224536005', '224537001', '224538006', '224540001', '224541002', '224542009', '224543004', '224544005', '224545006', '224546007', '224547003', '224548008', '224549000', '224550000', '224551001', '224552008', '224553003', '224554009', '224555005', '224556006', '224557002', '224558007', '224559004', '224560009', '224561008', '224562001', '224563006', '224564000', '224565004', '224566003', '224567007', '224569005', '224570006', '224571005', '224572003', '224573008', '224574002', '224575001', '224576000', '224577009', '224578004', '224579007', '224580005', '224581009', '224583007', '224584001', '224585000', '224586004', '224587008', '224588003', '224589006', '224590002', '224591003', '224592005', '224593000', '224594006', '224595007', '224596008', '224597004', '224598009', '224599001', '224600003', '224601004', '224602006', '224603001', '224604007', '224605008', '224606009', '224607000', '224608005', '224609002', '224610007', '224614003', '224615002', '224620002', '224621003', '224622005', '224623000', '224624006', '224625007', '224626008', '224936003', '225726006', '225727002', '265937000', '265939002', '283875005', '302211009', '303124005', '303129000', '303133007', '303134001', '304291006', '304292004', '307988006', '308002005', '309294001', '309295000', '309296004', '309322005', '309323000', '309324006', '309326008', '309327004', '309328009', '309329001', '309330006', '309331005', '309332003', '309333008', '309334002', '309335001', '309336000', '309337009', '309338004', '309339007', '309340009', '309341008', '309342001', '309343006', '309345004', '309346003', '309347007', '309348002', '309349005', '309350005', '309351009', '309352002', '309353007', '309354001', '309355000', '309356004', '309357008', '309358003', '309359006', '309360001', '309361002', '309362009', '309363004', '309364005', '309365006', '309366007', '309367003', '309368008', '309369000', '309371000', '309372007', '309373002', '309374008', '309375009', '309376005', '309377001', '309378006', '309379003', '309380000', '309381001', '309382008', '309383003', '309384009', '309385005', '309386006', '309388007', '309389004', '309390008', '309391007', '309392000', '309393005', '309394004', '309395003', '309396002', '309397006', '309398001', '309399009', '309400002', '309401003', '309402005', '309403000', '309404006', '309409001', '309410006', '309411005', '309412003', '309413008', '309414002', '309415001', '309416000', '309417009', '309418004', '309419007', '309420001', '309421002', '309422009', '309423004', '309427003', '309428008', '309429000', '309434001', '309435000', '309436004', '309437008', '309439006', '309440008', '309441007', '309442000', '309443005', '309444004', '309445003', '309446002', '309450009', '309452001', '309453006', '309454000', '309455004', '309459005', '309460000', '310170009', '310171008', '310172001', '310173006', '310174000', '310175004', '310176003', '310177007', '310178002', '310179005', '310180008', '310181007', '310182000', '310183005', '310184004', '310185003', '310186002', '310187006', '310188001', '310189009', '310190000', '310191001', '310192008', '310193003', '310194009', '310512001', '311441001', '312485001', '372102007', '387619007', '394572006', '394618009', '397824005', '397897005', '397903001', '397908005', '398130009', '398238009', '404940000', '405277009', '405278004', '405279007', '405623001', '405684005', '405685006', '408798009', '408799001', '409974004', '409975003', '413854007', '415075003', '415506007', '416160000', '420409002', '420678001', '421841007', '422140007', '422234006', '432100008', '442867008', '443090005', '444912007', '445313000', '445451001', '446050000', '446701002', '449161006', '471302004', '3981000175106', '394745000', '394746004', '394747008', '394748003', '394749006', '394751005', '394757009', '394758004', '394760002', '394762005', '394763000', '394764006', '394765007', '398154004', '398255008']}, 'type'=>'CodeableConcept', 'path'=>'Participant.role', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/participant-role'}},
37
- 'member' => {'type'=>'Reference', 'path'=>'Participant.member', 'min'=>0, 'max'=>1},
37
+ 'member' => {'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/Organization'], 'type'=>'Reference', 'path'=>'Participant.member', 'min'=>0, 'max'=>1},
38
38
  'period' => {'type'=>'Period', 'path'=>'Participant.period', 'min'=>0, 'max'=>1}
39
39
  }
40
40
 
@@ -42,7 +42,7 @@ module FHIR
42
42
  attr_accessor :extension # 0-* [ Extension ]
43
43
  attr_accessor :modifierExtension # 0-* [ Extension ]
44
44
  attr_accessor :role # 0-1 CodeableConcept
45
- attr_accessor :member # 0-1 Reference()
45
+ attr_accessor :member # 0-1 Reference(Practitioner|RelatedPerson|Patient|Organization)
46
46
  attr_accessor :period # 0-1 Period
47
47
  end
48
48
 
@@ -58,10 +58,10 @@ module FHIR
58
58
  attr_accessor :status # 0-1 CodeableConcept
59
59
  attr_accessor :category # 0-* [ CodeableConcept ]
60
60
  attr_accessor :name # 0-1 string
61
- attr_accessor :subject # 0-1 Reference()
61
+ attr_accessor :subject # 0-1 Reference(Patient|Group)
62
62
  attr_accessor :period # 0-1 Period
63
63
  attr_accessor :participant # 0-* [ CareTeam::Participant ]
64
- attr_accessor :managingOrganization # 0-* [ Reference() ]
64
+ attr_accessor :managingOrganization # 0-* [ Reference(Organization) ]
65
65
 
66
66
  def resourceType
67
67
  'CareTeam'
@@ -4,7 +4,7 @@ module FHIR
4
4
  include FHIR::Json
5
5
  include FHIR::Xml
6
6
 
7
- SEARCH_PARAMS = []
7
+ SEARCH_PARAMS = ['created', 'facility', 'identifier', 'insurer', 'organization', 'patient', 'priority', 'provider', 'use']
8
8
  METADATA = {
9
9
  'id' => {'type'=>'id', 'path'=>'Claim.id', 'min'=>0, 'max'=>1},
10
10
  'meta' => {'type'=>'Meta', 'path'=>'Claim.meta', 'min'=>0, 'max'=>1},
@@ -19,21 +19,21 @@ module FHIR
19
19
  'type' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimtype'=>['institutional', 'oral', 'pharmacy', 'professional', 'vision', 'institutional', 'oral', 'pharmacy', 'professional', 'vision']}, 'type'=>'CodeableConcept', 'path'=>'Claim.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/claim-type'}},
20
20
  'subType' => {'valid_codes'=>{'http://hl7.org/fhir/ex-claimsubtype'=>['ortho', 'emergency', 'ortho', 'emergency']}, 'type'=>'CodeableConcept', 'path'=>'Claim.subType', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/claim-subtype'}},
21
21
  'use' => {'valid_codes'=>{'http://hl7.org/fhir/claim-use'=>['complete', 'proposed', 'exploratory', 'other', 'complete', 'proposed', 'exploratory', 'other']}, 'type'=>'code', 'path'=>'Claim.use', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/claim-use'}},
22
- 'patient' => {'type'=>'Reference', 'path'=>'Claim.patient', 'min'=>0, 'max'=>1},
22
+ 'patient' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'Claim.patient', 'min'=>0, 'max'=>1},
23
23
  'billablePeriod' => {'type'=>'Period', 'path'=>'Claim.billablePeriod', 'min'=>0, 'max'=>1},
24
24
  'created' => {'type'=>'dateTime', 'path'=>'Claim.created', 'min'=>0, 'max'=>1},
25
- 'enterer' => {'type'=>'Reference', 'path'=>'Claim.enterer', 'min'=>0, 'max'=>1},
26
- 'insurer' => {'type'=>'Reference', 'path'=>'Claim.insurer', 'min'=>0, 'max'=>1},
27
- 'provider' => {'type'=>'Reference', 'path'=>'Claim.provider', 'min'=>0, 'max'=>1},
28
- 'organization' => {'type'=>'Reference', 'path'=>'Claim.organization', 'min'=>0, 'max'=>1},
25
+ 'enterer' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'Claim.enterer', 'min'=>0, 'max'=>1},
26
+ 'insurer' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Claim.insurer', 'min'=>0, 'max'=>1},
27
+ 'provider' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'Claim.provider', 'min'=>0, 'max'=>1},
28
+ 'organization' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Claim.organization', 'min'=>0, 'max'=>1},
29
29
  'priority' => {'valid_codes'=>{'http://hl7.org/fhir/processpriority'=>['stat', 'normal', 'deferred', 'stat', 'normal', 'deferred']}, 'type'=>'CodeableConcept', 'path'=>'Claim.priority', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/process-priority'}},
30
30
  'fundsReserve' => {'valid_codes'=>{'http://hl7.org/fhir/fundsreserve'=>['patient', 'provider', 'none', 'patient', 'provider', 'none']}, 'type'=>'CodeableConcept', 'path'=>'Claim.fundsReserve', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/fundsreserve'}},
31
31
  'related' => {'type'=>'Claim::Related', 'path'=>'Claim.related', 'min'=>0, 'max'=>Float::INFINITY},
32
- 'prescription' => {'type'=>'Reference', 'path'=>'Claim.prescription', 'min'=>0, 'max'=>1},
33
- 'originalPrescription' => {'type'=>'Reference', 'path'=>'Claim.originalPrescription', 'min'=>0, 'max'=>1},
32
+ 'prescription' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/MedicationRequest', 'http://hl7.org/fhir/StructureDefinition/VisionPrescription'], 'type'=>'Reference', 'path'=>'Claim.prescription', 'min'=>0, 'max'=>1},
33
+ 'originalPrescription' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/MedicationRequest'], 'type'=>'Reference', 'path'=>'Claim.originalPrescription', 'min'=>0, 'max'=>1},
34
34
  'payee' => {'type'=>'Claim::Payee', 'path'=>'Claim.payee', 'min'=>0, 'max'=>1},
35
- 'referral' => {'type'=>'Reference', 'path'=>'Claim.referral', 'min'=>0, 'max'=>1},
36
- 'facility' => {'type'=>'Reference', 'path'=>'Claim.facility', 'min'=>0, 'max'=>1},
35
+ 'referral' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/ReferralRequest'], 'type'=>'Reference', 'path'=>'Claim.referral', 'min'=>0, 'max'=>1},
36
+ 'facility' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Claim.facility', 'min'=>0, 'max'=>1},
37
37
  'careTeam' => {'type'=>'Claim::CareTeam', 'path'=>'Claim.careTeam', 'min'=>0, 'max'=>Float::INFINITY},
38
38
  'information' => {'type'=>'Claim::Information', 'path'=>'Claim.information', 'min'=>0, 'max'=>Float::INFINITY},
39
39
  'diagnosis' => {'type'=>'Claim::Diagnosis', 'path'=>'Claim.diagnosis', 'min'=>0, 'max'=>Float::INFINITY},
@@ -55,7 +55,7 @@ module FHIR
55
55
  'id' => {'type'=>'string', 'path'=>'Related.id', 'min'=>0, 'max'=>1},
56
56
  'extension' => {'type'=>'Extension', 'path'=>'Related.extension', 'min'=>0, 'max'=>Float::INFINITY},
57
57
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Related.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
58
- 'claim' => {'type'=>'Reference', 'path'=>'Related.claim', 'min'=>0, 'max'=>1},
58
+ 'claim' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Claim'], 'type'=>'Reference', 'path'=>'Related.claim', 'min'=>0, 'max'=>1},
59
59
  'relationship' => {'valid_codes'=>{'http://hl7.org/fhir/ex-relatedclaimrelationship'=>['prior', 'associated', 'prior', 'associated']}, 'type'=>'CodeableConcept', 'path'=>'Related.relationship', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/related-claim-relationship'}},
60
60
  'reference' => {'type'=>'Identifier', 'path'=>'Related.reference', 'min'=>0, 'max'=>1}
61
61
  }
@@ -63,7 +63,7 @@ module FHIR
63
63
  attr_accessor :id # 0-1 string
64
64
  attr_accessor :extension # 0-* [ Extension ]
65
65
  attr_accessor :modifierExtension # 0-* [ Extension ]
66
- attr_accessor :claim # 0-1 Reference()
66
+ attr_accessor :claim # 0-1 Reference(Claim)
67
67
  attr_accessor :relationship # 0-1 CodeableConcept
68
68
  attr_accessor :reference # 0-1 Identifier
69
69
  end
@@ -79,7 +79,7 @@ module FHIR
79
79
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Payee.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
80
80
  'type' => {'valid_codes'=>{'http://hl7.org/fhir/payeetype'=>['subscriber', 'provider', 'other', 'subscriber', 'provider', 'other']}, 'type'=>'CodeableConcept', 'path'=>'Payee.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/payeetype'}},
81
81
  'resourceType' => {'local_name'=>'local_resourceType', 'valid_codes'=>{'http://hl7.org/fhir/ex-payee-resource-type'=>['organization', 'patient', 'practitioner', 'relatedperson', 'organization', 'patient', 'practitioner', 'relatedperson']}, 'type'=>'Coding', 'path'=>'Payee.resourceType', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ex-payee-resource-type'}},
82
- 'party' => {'type'=>'Reference', 'path'=>'Payee.party', 'min'=>0, 'max'=>1}
82
+ 'party' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson'], 'type'=>'Reference', 'path'=>'Payee.party', 'min'=>0, 'max'=>1}
83
83
  }
84
84
 
85
85
  attr_accessor :id # 0-1 string
@@ -87,7 +87,7 @@ module FHIR
87
87
  attr_accessor :modifierExtension # 0-* [ Extension ]
88
88
  attr_accessor :type # 1-1 CodeableConcept
89
89
  attr_accessor :local_resourceType # 0-1 Coding
90
- attr_accessor :party # 0-1 Reference()
90
+ attr_accessor :party # 0-1 Reference(Practitioner|Organization|Patient|RelatedPerson)
91
91
  end
92
92
 
93
93
  class CareTeam < FHIR::Model
@@ -100,7 +100,7 @@ module FHIR
100
100
  'extension' => {'type'=>'Extension', 'path'=>'CareTeam.extension', 'min'=>0, 'max'=>Float::INFINITY},
101
101
  'modifierExtension' => {'type'=>'Extension', 'path'=>'CareTeam.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
102
102
  'sequence' => {'type'=>'positiveInt', 'path'=>'CareTeam.sequence', 'min'=>1, 'max'=>1},
103
- 'provider' => {'type'=>'Reference', 'path'=>'CareTeam.provider', 'min'=>1, 'max'=>1},
103
+ 'provider' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'CareTeam.provider', 'min'=>1, 'max'=>1},
104
104
  'responsible' => {'type'=>'boolean', 'path'=>'CareTeam.responsible', 'min'=>0, 'max'=>1},
105
105
  'role' => {'valid_codes'=>{'http://hl7.org/fhir/claimcareteamrole'=>['primary', 'assist', 'supervisor', 'other', 'primary', 'assist', 'supervisor', 'other']}, 'type'=>'CodeableConcept', 'path'=>'CareTeam.role', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/claim-careteamrole'}},
106
106
  'qualification' => {'valid_codes'=>{'http://hl7.org/fhir/ex-providerqualification'=>['311405', '604215', '604210', '311405', '604215', '604210']}, 'type'=>'CodeableConcept', 'path'=>'CareTeam.qualification', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/provider-qualification'}}
@@ -110,7 +110,7 @@ module FHIR
110
110
  attr_accessor :extension # 0-* [ Extension ]
111
111
  attr_accessor :modifierExtension # 0-* [ Extension ]
112
112
  attr_accessor :sequence # 1-1 positiveInt
113
- attr_accessor :provider # 1-1 Reference()
113
+ attr_accessor :provider # 1-1 Reference(Practitioner|Organization)
114
114
  attr_accessor :responsible # 0-1 boolean
115
115
  attr_accessor :role # 0-1 CodeableConcept
116
116
  attr_accessor :qualification # 0-1 CodeableConcept
@@ -136,7 +136,7 @@ module FHIR
136
136
  'valueString' => {'type'=>'string', 'path'=>'Information.value[x]', 'min'=>0, 'max'=>1},
137
137
  'valueQuantity' => {'type'=>'Quantity', 'path'=>'Information.value[x]', 'min'=>0, 'max'=>1},
138
138
  'valueAttachment' => {'type'=>'Attachment', 'path'=>'Information.value[x]', 'min'=>0, 'max'=>1},
139
- 'valueReference' => {'type'=>'Reference', 'path'=>'Information.value[x]', 'min'=>0, 'max'=>1},
139
+ 'valueReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Information.value[x]', 'min'=>0, 'max'=>1},
140
140
  'reason' => {'valid_codes'=>{'http://hl7.org/fhir/missingtoothreason'=>['e', 'c', 'u', 'o', 'e', 'c', 'u', 'o']}, 'type'=>'CodeableConcept', 'path'=>'Information.reason', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/missing-tooth-reason'}}
141
141
  }
142
142
 
@@ -150,7 +150,7 @@ module FHIR
150
150
  attr_accessor :valueString # 0-1 string
151
151
  attr_accessor :valueQuantity # 0-1 Quantity
152
152
  attr_accessor :valueAttachment # 0-1 Attachment
153
- attr_accessor :valueReference # 0-1 Reference()
153
+ attr_accessor :valueReference # 0-1 Reference(Resource)
154
154
  attr_accessor :reason # 0-1 CodeableConcept
155
155
  end
156
156
 
@@ -168,7 +168,7 @@ module FHIR
168
168
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Diagnosis.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
169
169
  'sequence' => {'type'=>'positiveInt', 'path'=>'Diagnosis.sequence', 'min'=>1, 'max'=>1},
170
170
  'diagnosisCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'Diagnosis.diagnosis[x]', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/icd-10'}},
171
- 'diagnosisReference' => {'type'=>'Reference', 'path'=>'Diagnosis.diagnosis[x]', 'min'=>1, 'max'=>1},
171
+ 'diagnosisReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Condition'], 'type'=>'Reference', 'path'=>'Diagnosis.diagnosis[x]', 'min'=>1, 'max'=>1},
172
172
  'type' => {'valid_codes'=>{'http://hl7.org/fhir/ex-diagnosistype'=>['admitting', 'clinical', 'differential', 'discharge', 'laboratory', 'nursing', 'prenatal', 'principal', 'radiology', 'remote', 'retrospective', 'self', 'admitting', 'clinical', 'differential', 'discharge', 'laboratory', 'nursing', 'prenatal', 'principal', 'radiology', 'remote', 'retrospective', 'self']}, 'type'=>'CodeableConcept', 'path'=>'Diagnosis.type', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ex-diagnosistype'}},
173
173
  'packageCode' => {'valid_codes'=>{'http://hl7.org/fhir/ex-diagnosisrelatedgroup'=>['100', '101', '300', '100', '101', '300']}, 'type'=>'CodeableConcept', 'path'=>'Diagnosis.packageCode', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/ex-diagnosisrelatedgroup'}}
174
174
  }
@@ -178,7 +178,7 @@ module FHIR
178
178
  attr_accessor :modifierExtension # 0-* [ Extension ]
179
179
  attr_accessor :sequence # 1-1 positiveInt
180
180
  attr_accessor :diagnosisCodeableConcept # 1-1 CodeableConcept
181
- attr_accessor :diagnosisReference # 1-1 Reference()
181
+ attr_accessor :diagnosisReference # 1-1 Reference(Condition)
182
182
  attr_accessor :type # 0-* [ CodeableConcept ]
183
183
  attr_accessor :packageCode # 0-1 CodeableConcept
184
184
  end
@@ -198,7 +198,7 @@ module FHIR
198
198
  'sequence' => {'type'=>'positiveInt', 'path'=>'Procedure.sequence', 'min'=>1, 'max'=>1},
199
199
  'date' => {'type'=>'dateTime', 'path'=>'Procedure.date', 'min'=>0, 'max'=>1},
200
200
  'procedureCodeableConcept' => {'valid_codes'=>{'http://hl7.org/fhir/sid/ex-icd-10-procedures'=>['123001', '123002', '123003', '123001', '123002', '123003']}, 'type'=>'CodeableConcept', 'path'=>'Procedure.procedure[x]', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/icd-10-procedures'}},
201
- 'procedureReference' => {'type'=>'Reference', 'path'=>'Procedure.procedure[x]', 'min'=>1, 'max'=>1}
201
+ 'procedureReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Procedure'], 'type'=>'Reference', 'path'=>'Procedure.procedure[x]', 'min'=>1, 'max'=>1}
202
202
  }
203
203
 
204
204
  attr_accessor :id # 0-1 string
@@ -207,7 +207,7 @@ module FHIR
207
207
  attr_accessor :sequence # 1-1 positiveInt
208
208
  attr_accessor :date # 0-1 dateTime
209
209
  attr_accessor :procedureCodeableConcept # 1-1 CodeableConcept
210
- attr_accessor :procedureReference # 1-1 Reference()
210
+ attr_accessor :procedureReference # 1-1 Reference(Procedure)
211
211
  end
212
212
 
213
213
  class Insurance < FHIR::Model
@@ -221,10 +221,10 @@ module FHIR
221
221
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Insurance.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
222
222
  'sequence' => {'type'=>'positiveInt', 'path'=>'Insurance.sequence', 'min'=>1, 'max'=>1},
223
223
  'focal' => {'type'=>'boolean', 'path'=>'Insurance.focal', 'min'=>1, 'max'=>1},
224
- 'coverage' => {'type'=>'Reference', 'path'=>'Insurance.coverage', 'min'=>1, 'max'=>1},
224
+ 'coverage' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Coverage'], 'type'=>'Reference', 'path'=>'Insurance.coverage', 'min'=>1, 'max'=>1},
225
225
  'businessArrangement' => {'type'=>'string', 'path'=>'Insurance.businessArrangement', 'min'=>0, 'max'=>1},
226
226
  'preAuthRef' => {'type'=>'string', 'path'=>'Insurance.preAuthRef', 'min'=>0, 'max'=>Float::INFINITY},
227
- 'claimResponse' => {'type'=>'Reference', 'path'=>'Insurance.claimResponse', 'min'=>0, 'max'=>1}
227
+ 'claimResponse' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/ClaimResponse'], 'type'=>'Reference', 'path'=>'Insurance.claimResponse', 'min'=>0, 'max'=>1}
228
228
  }
229
229
 
230
230
  attr_accessor :id # 0-1 string
@@ -232,10 +232,10 @@ module FHIR
232
232
  attr_accessor :modifierExtension # 0-* [ Extension ]
233
233
  attr_accessor :sequence # 1-1 positiveInt
234
234
  attr_accessor :focal # 1-1 boolean
235
- attr_accessor :coverage # 1-1 Reference()
235
+ attr_accessor :coverage # 1-1 Reference(Coverage)
236
236
  attr_accessor :businessArrangement # 0-1 string
237
237
  attr_accessor :preAuthRef # 0-* [ string ]
238
- attr_accessor :claimResponse # 0-1 Reference()
238
+ attr_accessor :claimResponse # 0-1 Reference(ClaimResponse)
239
239
  end
240
240
 
241
241
  class Accident < FHIR::Model
@@ -253,7 +253,7 @@ module FHIR
253
253
  'date' => {'type'=>'date', 'path'=>'Accident.date', 'min'=>1, 'max'=>1},
254
254
  'type' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActCode'=>['MVA', 'SCHOOL', 'SPT', 'WPA']}, 'type'=>'CodeableConcept', 'path'=>'Accident.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-ActIncidentCode'}},
255
255
  'locationAddress' => {'type'=>'Address', 'path'=>'Accident.location[x]', 'min'=>0, 'max'=>1},
256
- 'locationReference' => {'type'=>'Reference', 'path'=>'Accident.location[x]', 'min'=>0, 'max'=>1}
256
+ 'locationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Accident.location[x]', 'min'=>0, 'max'=>1}
257
257
  }
258
258
 
259
259
  attr_accessor :id # 0-1 string
@@ -262,7 +262,7 @@ module FHIR
262
262
  attr_accessor :date # 1-1 date
263
263
  attr_accessor :type # 0-1 CodeableConcept
264
264
  attr_accessor :locationAddress # 0-1 Address
265
- attr_accessor :locationReference # 0-1 Reference()
265
+ attr_accessor :locationReference # 0-1 Reference(Location)
266
266
  end
267
267
 
268
268
  class Item < FHIR::Model
@@ -292,12 +292,12 @@ module FHIR
292
292
  'servicedPeriod' => {'type'=>'Period', 'path'=>'Item.serviced[x]', 'min'=>0, 'max'=>1},
293
293
  'locationCodeableConcept' => {'valid_codes'=>{'http://hl7.org/fhir/ex-serviceplace'=>['01', '03', '04', '05', '06', '07', '08', '09', '11', '12', '13', '14', '15', '19', '20', '21', '41', '01', '03', '04', '05', '06', '07', '08', '09', '11', '12', '13', '14', '15', '19', '20', '21', '41']}, 'type'=>'CodeableConcept', 'path'=>'Item.location[x]', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/service-place'}},
294
294
  'locationAddress' => {'type'=>'Address', 'path'=>'Item.location[x]', 'min'=>0, 'max'=>1},
295
- 'locationReference' => {'type'=>'Reference', 'path'=>'Item.location[x]', 'min'=>0, 'max'=>1},
295
+ 'locationReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Item.location[x]', 'min'=>0, 'max'=>1},
296
296
  'quantity' => {'type'=>'Quantity', 'path'=>'Item.quantity', 'min'=>0, 'max'=>1},
297
297
  'unitPrice' => {'type'=>'Money', 'path'=>'Item.unitPrice', 'min'=>0, 'max'=>1},
298
298
  'factor' => {'type'=>'decimal', 'path'=>'Item.factor', 'min'=>0, 'max'=>1},
299
299
  'net' => {'type'=>'Money', 'path'=>'Item.net', 'min'=>0, 'max'=>1},
300
- 'udi' => {'type'=>'Reference', 'path'=>'Item.udi', 'min'=>0, 'max'=>Float::INFINITY},
300
+ 'udi' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'Item.udi', 'min'=>0, 'max'=>Float::INFINITY},
301
301
  'bodySite' => {'valid_codes'=>{'http://hl7.org/fhir/ex-tooth'=>['0', '1', '2', '3', '4', '5', '6', '7', '8', '11', '12', '13', '14', '15', '16', '17', '18', '21', '22', '23', '24', '25', '26', '27', '28', '31', '32', '33', '34', '35', '36', '37', '38', '41', '42', '43', '44', '45', '46', '47', '48', '0', '1', '2', '3', '4', '5', '6', '7', '8', '11', '12', '13', '14', '15', '16', '17', '18', '21', '22', '23', '24', '25', '26', '27', '28', '31', '32', '33', '34', '35', '36', '37', '38', '41', '42', '43', '44', '45', '46', '47', '48']}, 'type'=>'CodeableConcept', 'path'=>'Item.bodySite', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/tooth'}},
302
302
  'subSite' => {'valid_codes'=>{'http://hl7.org/fhir/FDI-surface'=>['M', 'O', 'I', 'D', 'B', 'V', 'L', 'MO', 'DO', 'DI', 'MOD', 'M', 'O', 'I', 'D', 'B', 'V', 'L', 'MO', 'DO', 'DI', 'MOD']}, 'type'=>'CodeableConcept', 'path'=>'Item.subSite', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/surface'}},
303
303
  'detail' => {'type'=>'Claim::Item::Detail', 'path'=>'Item.detail', 'min'=>0, 'max'=>Float::INFINITY},
@@ -323,7 +323,7 @@ module FHIR
323
323
  'unitPrice' => {'type'=>'Money', 'path'=>'Detail.unitPrice', 'min'=>0, 'max'=>1},
324
324
  'factor' => {'type'=>'decimal', 'path'=>'Detail.factor', 'min'=>0, 'max'=>1},
325
325
  'net' => {'type'=>'Money', 'path'=>'Detail.net', 'min'=>0, 'max'=>1},
326
- 'udi' => {'type'=>'Reference', 'path'=>'Detail.udi', 'min'=>0, 'max'=>Float::INFINITY},
326
+ 'udi' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'Detail.udi', 'min'=>0, 'max'=>Float::INFINITY},
327
327
  'subDetail' => {'type'=>'Claim::Item::Detail::SubDetail', 'path'=>'Detail.subDetail', 'min'=>0, 'max'=>Float::INFINITY}
328
328
  }
329
329
 
@@ -346,7 +346,7 @@ module FHIR
346
346
  'unitPrice' => {'type'=>'Money', 'path'=>'SubDetail.unitPrice', 'min'=>0, 'max'=>1},
347
347
  'factor' => {'type'=>'decimal', 'path'=>'SubDetail.factor', 'min'=>0, 'max'=>1},
348
348
  'net' => {'type'=>'Money', 'path'=>'SubDetail.net', 'min'=>0, 'max'=>1},
349
- 'udi' => {'type'=>'Reference', 'path'=>'SubDetail.udi', 'min'=>0, 'max'=>Float::INFINITY}
349
+ 'udi' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Device'], 'type'=>'Reference', 'path'=>'SubDetail.udi', 'min'=>0, 'max'=>Float::INFINITY}
350
350
  }
351
351
 
352
352
  attr_accessor :id # 0-1 string
@@ -362,7 +362,7 @@ module FHIR
362
362
  attr_accessor :unitPrice # 0-1 Money
363
363
  attr_accessor :factor # 0-1 decimal
364
364
  attr_accessor :net # 0-1 Money
365
- attr_accessor :udi # 0-* [ Reference() ]
365
+ attr_accessor :udi # 0-* [ Reference(Device) ]
366
366
  end
367
367
 
368
368
  attr_accessor :id # 0-1 string
@@ -378,7 +378,7 @@ module FHIR
378
378
  attr_accessor :unitPrice # 0-1 Money
379
379
  attr_accessor :factor # 0-1 decimal
380
380
  attr_accessor :net # 0-1 Money
381
- attr_accessor :udi # 0-* [ Reference() ]
381
+ attr_accessor :udi # 0-* [ Reference(Device) ]
382
382
  attr_accessor :subDetail # 0-* [ Claim::Item::Detail::SubDetail ]
383
383
  end
384
384
 
@@ -421,12 +421,12 @@ module FHIR
421
421
  attr_accessor :servicedPeriod # 0-1 Period
422
422
  attr_accessor :locationCodeableConcept # 0-1 CodeableConcept
423
423
  attr_accessor :locationAddress # 0-1 Address
424
- attr_accessor :locationReference # 0-1 Reference()
424
+ attr_accessor :locationReference # 0-1 Reference(Location)
425
425
  attr_accessor :quantity # 0-1 Quantity
426
426
  attr_accessor :unitPrice # 0-1 Money
427
427
  attr_accessor :factor # 0-1 decimal
428
428
  attr_accessor :net # 0-1 Money
429
- attr_accessor :udi # 0-* [ Reference() ]
429
+ attr_accessor :udi # 0-* [ Reference(Device) ]
430
430
  attr_accessor :bodySite # 0-1 CodeableConcept
431
431
  attr_accessor :subSite # 0-* [ CodeableConcept ]
432
432
  attr_accessor :detail # 0-* [ Claim::Item::Detail ]
@@ -446,21 +446,21 @@ module FHIR
446
446
  attr_accessor :type # 0-1 CodeableConcept
447
447
  attr_accessor :subType # 0-* [ CodeableConcept ]
448
448
  attr_accessor :use # 0-1 code
449
- attr_accessor :patient # 0-1 Reference()
449
+ attr_accessor :patient # 0-1 Reference(Patient)
450
450
  attr_accessor :billablePeriod # 0-1 Period
451
451
  attr_accessor :created # 0-1 dateTime
452
- attr_accessor :enterer # 0-1 Reference()
453
- attr_accessor :insurer # 0-1 Reference()
454
- attr_accessor :provider # 0-1 Reference()
455
- attr_accessor :organization # 0-1 Reference()
452
+ attr_accessor :enterer # 0-1 Reference(Practitioner)
453
+ attr_accessor :insurer # 0-1 Reference(Organization)
454
+ attr_accessor :provider # 0-1 Reference(Practitioner)
455
+ attr_accessor :organization # 0-1 Reference(Organization)
456
456
  attr_accessor :priority # 0-1 CodeableConcept
457
457
  attr_accessor :fundsReserve # 0-1 CodeableConcept
458
458
  attr_accessor :related # 0-* [ Claim::Related ]
459
- attr_accessor :prescription # 0-1 Reference()
460
- attr_accessor :originalPrescription # 0-1 Reference()
459
+ attr_accessor :prescription # 0-1 Reference(MedicationRequest|VisionPrescription)
460
+ attr_accessor :originalPrescription # 0-1 Reference(MedicationRequest)
461
461
  attr_accessor :payee # 0-1 Claim::Payee
462
- attr_accessor :referral # 0-1 Reference()
463
- attr_accessor :facility # 0-1 Reference()
462
+ attr_accessor :referral # 0-1 Reference(ReferralRequest)
463
+ attr_accessor :facility # 0-1 Reference(Location)
464
464
  attr_accessor :careTeam # 0-* [ Claim::CareTeam ]
465
465
  attr_accessor :information # 0-* [ Claim::Information ]
466
466
  attr_accessor :diagnosis # 0-* [ Claim::Diagnosis ]
@@ -4,7 +4,7 @@ module FHIR
4
4
  include FHIR::Json
5
5
  include FHIR::Xml
6
6
 
7
- SEARCH_PARAMS = []
7
+ SEARCH_PARAMS = ['created', 'disposition', 'identifier', 'insurer', 'outcome', 'payment-date', 'request']
8
8
  METADATA = {
9
9
  'id' => {'type'=>'id', 'path'=>'ClaimResponse.id', 'min'=>0, 'max'=>1},
10
10
  'meta' => {'type'=>'Meta', 'path'=>'ClaimResponse.meta', 'min'=>0, 'max'=>1},
@@ -17,10 +17,10 @@ module FHIR
17
17
  'identifier' => {'type'=>'Identifier', 'path'=>'ClaimResponse.identifier', 'min'=>0, 'max'=>Float::INFINITY},
18
18
  'status' => {'valid_codes'=>{'http://hl7.org/fhir/fm-status'=>['active', 'cancelled', 'draft', 'entered-in-error', 'active', 'cancelled', 'draft', 'entered-in-error']}, 'type'=>'code', 'path'=>'ClaimResponse.status', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/fm-status'}},
19
19
  'created' => {'type'=>'dateTime', 'path'=>'ClaimResponse.created', 'min'=>0, 'max'=>1},
20
- 'insurer' => {'type'=>'Reference', 'path'=>'ClaimResponse.insurer', 'min'=>0, 'max'=>1},
21
- 'requestProvider' => {'type'=>'Reference', 'path'=>'ClaimResponse.requestProvider', 'min'=>0, 'max'=>1},
22
- 'requestOrganization' => {'type'=>'Reference', 'path'=>'ClaimResponse.requestOrganization', 'min'=>0, 'max'=>1},
23
- 'request' => {'type'=>'Reference', 'path'=>'ClaimResponse.request', 'min'=>0, 'max'=>1},
20
+ 'insurer' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'ClaimResponse.insurer', 'min'=>0, 'max'=>1},
21
+ 'requestProvider' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'ClaimResponse.requestProvider', 'min'=>0, 'max'=>1},
22
+ 'requestOrganization' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'ClaimResponse.requestOrganization', 'min'=>0, 'max'=>1},
23
+ 'request' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Claim'], 'type'=>'Reference', 'path'=>'ClaimResponse.request', 'min'=>0, 'max'=>1},
24
24
  'outcome' => {'valid_codes'=>{'http://hl7.org/fhir/remittance-outcome'=>['complete', 'error', 'partial', 'complete', 'error', 'partial']}, 'type'=>'CodeableConcept', 'path'=>'ClaimResponse.outcome', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/remittance-outcome'}},
25
25
  'disposition' => {'type'=>'string', 'path'=>'ClaimResponse.disposition', 'min'=>0, 'max'=>1},
26
26
  'payeeType' => {'valid_codes'=>{'http://hl7.org/fhir/payeetype'=>['subscriber', 'provider', 'other', 'subscriber', 'provider', 'other']}, 'type'=>'CodeableConcept', 'path'=>'ClaimResponse.payeeType', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/payeetype'}},
@@ -34,7 +34,7 @@ module FHIR
34
34
  'reserved' => {'valid_codes'=>{'http://hl7.org/fhir/fundsreserve'=>['patient', 'provider', 'none', 'patient', 'provider', 'none']}, 'type'=>'Coding', 'path'=>'ClaimResponse.reserved', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/fundsreserve'}},
35
35
  'form' => {'valid_codes'=>{'http://hl7.org/fhir/forms-codes'=>['1', '2', '1', '2']}, 'type'=>'CodeableConcept', 'path'=>'ClaimResponse.form', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/forms'}},
36
36
  'note' => {'type'=>'ClaimResponse::Note', 'path'=>'ClaimResponse.note', 'min'=>0, 'max'=>Float::INFINITY},
37
- 'communicationRequest' => {'type'=>'Reference', 'path'=>'ClaimResponse.communicationRequest', 'min'=>0, 'max'=>Float::INFINITY},
37
+ 'communicationRequest' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/CommunicationRequest'], 'type'=>'Reference', 'path'=>'ClaimResponse.communicationRequest', 'min'=>0, 'max'=>Float::INFINITY},
38
38
  'insurance' => {'type'=>'ClaimResponse::Insurance', 'path'=>'ClaimResponse.insurance', 'min'=>0, 'max'=>Float::INFINITY}
39
39
  }
40
40
 
@@ -283,10 +283,10 @@ module FHIR
283
283
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Insurance.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
284
284
  'sequence' => {'type'=>'positiveInt', 'path'=>'Insurance.sequence', 'min'=>1, 'max'=>1},
285
285
  'focal' => {'type'=>'boolean', 'path'=>'Insurance.focal', 'min'=>1, 'max'=>1},
286
- 'coverage' => {'type'=>'Reference', 'path'=>'Insurance.coverage', 'min'=>1, 'max'=>1},
286
+ 'coverage' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Coverage'], 'type'=>'Reference', 'path'=>'Insurance.coverage', 'min'=>1, 'max'=>1},
287
287
  'businessArrangement' => {'type'=>'string', 'path'=>'Insurance.businessArrangement', 'min'=>0, 'max'=>1},
288
288
  'preAuthRef' => {'type'=>'string', 'path'=>'Insurance.preAuthRef', 'min'=>0, 'max'=>Float::INFINITY},
289
- 'claimResponse' => {'type'=>'Reference', 'path'=>'Insurance.claimResponse', 'min'=>0, 'max'=>1}
289
+ 'claimResponse' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/ClaimResponse'], 'type'=>'Reference', 'path'=>'Insurance.claimResponse', 'min'=>0, 'max'=>1}
290
290
  }
291
291
 
292
292
  attr_accessor :id # 0-1 string
@@ -294,10 +294,10 @@ module FHIR
294
294
  attr_accessor :modifierExtension # 0-* [ Extension ]
295
295
  attr_accessor :sequence # 1-1 positiveInt
296
296
  attr_accessor :focal # 1-1 boolean
297
- attr_accessor :coverage # 1-1 Reference()
297
+ attr_accessor :coverage # 1-1 Reference(Coverage)
298
298
  attr_accessor :businessArrangement # 0-1 string
299
299
  attr_accessor :preAuthRef # 0-* [ string ]
300
- attr_accessor :claimResponse # 0-1 Reference()
300
+ attr_accessor :claimResponse # 0-1 Reference(ClaimResponse)
301
301
  end
302
302
 
303
303
  attr_accessor :id # 0-1 id
@@ -311,10 +311,10 @@ module FHIR
311
311
  attr_accessor :identifier # 0-* [ Identifier ]
312
312
  attr_accessor :status # 0-1 code
313
313
  attr_accessor :created # 0-1 dateTime
314
- attr_accessor :insurer # 0-1 Reference()
315
- attr_accessor :requestProvider # 0-1 Reference()
316
- attr_accessor :requestOrganization # 0-1 Reference()
317
- attr_accessor :request # 0-1 Reference()
314
+ attr_accessor :insurer # 0-1 Reference(Organization)
315
+ attr_accessor :requestProvider # 0-1 Reference(Practitioner)
316
+ attr_accessor :requestOrganization # 0-1 Reference(Organization)
317
+ attr_accessor :request # 0-1 Reference(Claim)
318
318
  attr_accessor :outcome # 0-1 CodeableConcept
319
319
  attr_accessor :disposition # 0-1 string
320
320
  attr_accessor :payeeType # 0-1 CodeableConcept
@@ -328,7 +328,7 @@ module FHIR
328
328
  attr_accessor :reserved # 0-1 Coding
329
329
  attr_accessor :form # 0-1 CodeableConcept
330
330
  attr_accessor :note # 0-* [ ClaimResponse::Note ]
331
- attr_accessor :communicationRequest # 0-* [ Reference() ]
331
+ attr_accessor :communicationRequest # 0-* [ Reference(CommunicationRequest) ]
332
332
  attr_accessor :insurance # 0-* [ ClaimResponse::Insurance ]
333
333
 
334
334
  def resourceType