lib/fhir_models/fhir/resources/Patient.rb in fhir_models-1.8.0 vs lib/fhir_models/fhir/resources/Patient.rb in fhir_models-1.8.1

- old
+ new

@@ -6,11 +6,11 @@ MULTIPLE_TYPES = { 'deceased' => ['boolean', 'dateTime'], 'multipleBirth' => ['boolean', 'integer'] } - SEARCH_PARAMS = [] + SEARCH_PARAMS = ['active', 'address', 'address-city', 'address-country', 'address-postalcode', 'address-state', 'address-use', 'animal-breed', 'animal-species', 'birthdate', 'death-date', 'deceased', 'email', 'family', 'gender', 'general-practitioner', 'given', 'identifier', 'language', 'link', 'name', 'organization', 'phone', 'phonetic', 'telecom'] METADATA = { 'id' => {'type'=>'id', 'path'=>'Patient.id', 'min'=>0, 'max'=>1}, 'meta' => {'type'=>'Meta', 'path'=>'Patient.meta', 'min'=>0, 'max'=>1}, 'implicitRules' => {'type'=>'uri', 'path'=>'Patient.implicitRules', 'min'=>0, 'max'=>1}, 'language' => {'valid_codes'=>{'urn:ietf:bcp:47'=>['bn', 'cs', 'da', 'de', 'de-AT', 'de-CH', 'de-DE', 'el', 'en', 'en-AU', 'en-CA', 'en-GB', 'en-IN', 'en-NZ', 'en-SG', 'en-US', 'es', 'es-AR', 'es-ES', 'es-UY', 'fi', 'fr', 'fr-BE', 'fr-CH', 'fr-FR', 'fy', 'fy-NL', 'hr', 'it', 'it-CH', 'it-IT', 'ja', 'ko', 'nl', 'nl-BE', 'nl-NL', 'no', 'no-NO', 'pt', 'pt-BR', 'ru', 'ru-RU', 'sr', 'sr-SP', 'sv', 'sv-SE', 'te', 'zh', 'zh-CN', 'zh-HK', 'zh-SG', 'zh-TW']}, 'type'=>'code', 'path'=>'Patient.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/languages'}}, @@ -32,12 +32,12 @@ 'multipleBirthInteger' => {'type'=>'integer', 'path'=>'Patient.multipleBirth[x]', 'min'=>0, 'max'=>1}, 'photo' => {'type'=>'Attachment', 'path'=>'Patient.photo', 'min'=>0, 'max'=>Float::INFINITY}, 'contact' => {'type'=>'Patient::Contact', 'path'=>'Patient.contact', 'min'=>0, 'max'=>Float::INFINITY}, 'animal' => {'type'=>'Patient::Animal', 'path'=>'Patient.animal', 'min'=>0, 'max'=>1}, 'communication' => {'type'=>'Patient::Communication', 'path'=>'Patient.communication', 'min'=>0, 'max'=>Float::INFINITY}, - 'generalPractitioner' => {'type'=>'Reference', 'path'=>'Patient.generalPractitioner', 'min'=>0, 'max'=>Float::INFINITY}, - 'managingOrganization' => {'type'=>'Reference', 'path'=>'Patient.managingOrganization', 'min'=>0, 'max'=>1}, + 'generalPractitioner' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Practitioner'], 'type'=>'Reference', 'path'=>'Patient.generalPractitioner', 'min'=>0, 'max'=>Float::INFINITY}, + 'managingOrganization' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Patient.managingOrganization', 'min'=>0, 'max'=>1}, 'link' => {'type'=>'Patient::Link', 'path'=>'Patient.link', 'min'=>0, 'max'=>Float::INFINITY} } class Contact < FHIR::Model include FHIR::Hashable @@ -51,11 +51,11 @@ 'relationship' => {'valid_codes'=>{'http://hl7.org/fhir/v2/0131'=>['BP', 'C', 'CP', 'E', 'EP', 'F', 'I', 'N', 'O', 'PR', 'S', 'U']}, 'type'=>'CodeableConcept', 'path'=>'Contact.relationship', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/v2-0131'}}, 'name' => {'type'=>'HumanName', 'path'=>'Contact.name', 'min'=>0, 'max'=>1}, 'telecom' => {'type'=>'ContactPoint', 'path'=>'Contact.telecom', 'min'=>0, 'max'=>Float::INFINITY}, 'address' => {'type'=>'Address', 'path'=>'Contact.address', 'min'=>0, 'max'=>1}, 'gender' => {'valid_codes'=>{'http://hl7.org/fhir/administrative-gender'=>['male', 'female', 'other', 'unknown', 'male', 'female', 'other', 'unknown']}, 'type'=>'code', 'path'=>'Contact.gender', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/administrative-gender'}}, - 'organization' => {'type'=>'Reference', 'path'=>'Contact.organization', 'min'=>0, 'max'=>1}, + 'organization' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Contact.organization', 'min'=>0, 'max'=>1}, 'period' => {'type'=>'Period', 'path'=>'Contact.period', 'min'=>0, 'max'=>1} } attr_accessor :id # 0-1 string attr_accessor :extension # 0-* [ Extension ] @@ -63,11 +63,11 @@ attr_accessor :relationship # 0-* [ CodeableConcept ] attr_accessor :name # 0-1 HumanName attr_accessor :telecom # 0-* [ ContactPoint ] attr_accessor :address # 0-1 Address attr_accessor :gender # 0-1 code - attr_accessor :organization # 0-1 Reference() + attr_accessor :organization # 0-1 Reference(Organization) attr_accessor :period # 0-1 Period end class Animal < FHIR::Model include FHIR::Hashable @@ -118,18 +118,18 @@ METADATA = { 'id' => {'type'=>'string', 'path'=>'Link.id', 'min'=>0, 'max'=>1}, 'extension' => {'type'=>'Extension', 'path'=>'Link.extension', 'min'=>0, 'max'=>Float::INFINITY}, 'modifierExtension' => {'type'=>'Extension', 'path'=>'Link.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY}, - 'other' => {'type'=>'Reference', 'path'=>'Link.other', 'min'=>1, 'max'=>1}, + 'other' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson'], 'type'=>'Reference', 'path'=>'Link.other', 'min'=>1, 'max'=>1}, 'type' => {'valid_codes'=>{'http://hl7.org/fhir/link-type'=>['replace', 'refer', 'seealso', 'replace', 'refer', 'seealso']}, 'type'=>'code', 'path'=>'Link.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/link-type'}} } attr_accessor :id # 0-1 string attr_accessor :extension # 0-* [ Extension ] attr_accessor :modifierExtension # 0-* [ Extension ] - attr_accessor :other # 1-1 Reference() + attr_accessor :other # 1-1 Reference(Patient|RelatedPerson) attr_accessor :type # 1-1 code end attr_accessor :id # 0-1 id attr_accessor :meta # 0-1 Meta @@ -153,11 +153,11 @@ attr_accessor :multipleBirthInteger # 0-1 integer attr_accessor :photo # 0-* [ Attachment ] attr_accessor :contact # 0-* [ Patient::Contact ] attr_accessor :animal # 0-1 Patient::Animal attr_accessor :communication # 0-* [ Patient::Communication ] - attr_accessor :generalPractitioner # 0-* [ Reference() ] - attr_accessor :managingOrganization # 0-1 Reference() + attr_accessor :generalPractitioner # 0-* [ Reference(Organization|Practitioner) ] + attr_accessor :managingOrganization # 0-1 Reference(Organization) attr_accessor :link # 0-* [ Patient::Link ] def resourceType 'Patient' end \ No newline at end of file