lib/fhir_models/fhir/resources/Library.rb in fhir_models-3.0.4 vs lib/fhir_models/fhir/resources/Library.rb in fhir_models-4.0.0

- old
+ new

@@ -2,81 +2,96 @@ class Library < FHIR::Model include FHIR::Hashable include FHIR::Json include FHIR::Xml - SEARCH_PARAMS = ['composed-of', 'date', 'depends-on', 'derived-from', 'description', 'effective', 'identifier', 'jurisdiction', 'name', 'predecessor', 'publisher', 'status', 'successor', 'title', 'topic', 'url', 'version'] + MULTIPLE_TYPES = { + 'subject' => ['CodeableConcept', 'Reference'] + } + SEARCH_PARAMS = ['composed-of', 'content-type', 'context', 'context-quantity', 'context-type', 'date', 'depends-on', 'derived-from', 'description', 'effective', 'identifier', 'jurisdiction', 'name', 'predecessor', 'publisher', 'status', 'successor', 'title', 'topic', 'type', 'url', 'version'] METADATA = { 'id' => {'type'=>'id', 'path'=>'Library.id', 'min'=>0, 'max'=>1}, 'meta' => {'type'=>'Meta', 'path'=>'Library.meta', 'min'=>0, 'max'=>1}, 'implicitRules' => {'type'=>'uri', 'path'=>'Library.implicitRules', 'min'=>0, 'max'=>1}, - 'language' => {'valid_codes'=>{'urn:ietf:bcp:47'=>['ar', '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', 'hi', 'hr', 'it', 'it-CH', 'it-IT', 'ja', 'ko', 'nl', 'nl-BE', 'nl-NL', 'no', 'no-NO', 'pa', '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'=>'Library.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/languages'}}, + 'language' => {'valid_codes'=>{'urn:ietf:bcp:47'=>['ar', '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', 'hi', 'hr', 'it', 'it-CH', 'it-IT', 'ja', 'ko', 'nl', 'nl-BE', 'nl-NL', 'no', 'no-NO', 'pa', 'pl', 'pt', 'pt-BR', 'ru', 'ru-RU', 'sr', 'sr-RS', 'sv', 'sv-SE', 'te', 'zh', 'zh-CN', 'zh-HK', 'zh-SG', 'zh-TW']}, 'type'=>'code', 'path'=>'Library.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'preferred', 'uri'=>'http://hl7.org/fhir/ValueSet/languages'}}, 'text' => {'type'=>'Narrative', 'path'=>'Library.text', 'min'=>0, 'max'=>1}, 'contained' => {'type'=>'Resource', 'path'=>'Library.contained', 'min'=>0, 'max'=>Float::INFINITY}, 'extension' => {'type'=>'Extension', 'path'=>'Library.extension', 'min'=>0, 'max'=>Float::INFINITY}, 'modifierExtension' => {'type'=>'Extension', 'path'=>'Library.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY}, 'url' => {'type'=>'uri', 'path'=>'Library.url', 'min'=>0, 'max'=>1}, 'identifier' => {'type'=>'Identifier', 'path'=>'Library.identifier', 'min'=>0, 'max'=>Float::INFINITY}, 'version' => {'type'=>'string', 'path'=>'Library.version', 'min'=>0, 'max'=>1}, 'name' => {'type'=>'string', 'path'=>'Library.name', 'min'=>0, 'max'=>1}, 'title' => {'type'=>'string', 'path'=>'Library.title', 'min'=>0, 'max'=>1}, - 'status' => {'valid_codes'=>{'http://hl7.org/fhir/publication-status'=>['draft', 'active', 'retired', 'unknown']}, 'type'=>'code', 'path'=>'Library.status', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/publication-status'}}, + 'subtitle' => {'type'=>'string', 'path'=>'Library.subtitle', 'min'=>0, 'max'=>1}, + 'status' => {'valid_codes'=>{'http://hl7.org/fhir/publication-status'=>['draft', 'active', 'retired', 'unknown']}, 'type'=>'code', 'path'=>'Library.status', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/publication-status|4.0.0'}}, 'experimental' => {'type'=>'boolean', 'path'=>'Library.experimental', 'min'=>0, 'max'=>1}, - 'type' => {'valid_codes'=>{'http://hl7.org/fhir/library-type'=>['logic-library', 'model-definition', 'asset-collection', 'module-definition']}, 'type'=>'CodeableConcept', 'path'=>'Library.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/library-type'}}, + 'type' => {'valid_codes'=>{'http://terminology.hl7.org/CodeSystem/library-type'=>['logic-library', 'model-definition', 'asset-collection', 'module-definition']}, 'type'=>'CodeableConcept', 'path'=>'Library.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/library-type'}}, + 'subjectCodeableConcept' => {'valid_codes'=>{'http://hl7.org/fhir/resource-types'=>['Patient', 'Practitioner', 'Organization', 'Location', 'Device', 'Account', 'ActivityDefinition', 'AdverseEvent', 'AllergyIntolerance', 'Appointment', 'AppointmentResponse', 'AuditEvent', 'Basic', 'Binary', 'BiologicallyDerivedProduct', 'BodyStructure', 'Bundle', 'CapabilityStatement', 'CarePlan', 'CareTeam', 'CatalogEntry', 'ChargeItem', 'ChargeItemDefinition', 'Claim', 'ClaimResponse', 'ClinicalImpression', 'CodeSystem', 'Communication', 'CommunicationRequest', 'CompartmentDefinition', 'Composition', 'ConceptMap', 'Condition', 'Consent', 'Contract', 'Coverage', 'CoverageEligibilityRequest', 'CoverageEligibilityResponse', 'DetectedIssue', 'DeviceDefinition', 'DeviceMetric', 'DeviceRequest', 'DeviceUseStatement', 'DiagnosticReport', 'DocumentManifest', 'DocumentReference', 'DomainResource', 'EffectEvidenceSynthesis', 'Encounter', 'Endpoint', 'EnrollmentRequest', 'EnrollmentResponse', 'EpisodeOfCare', 'EventDefinition', 'Evidence', 'EvidenceVariable', 'ExampleScenario', 'ExplanationOfBenefit', 'FamilyMemberHistory', 'Flag', 'Goal', 'GraphDefinition', 'Group', 'GuidanceResponse', 'HealthcareService', 'ImagingStudy', 'Immunization', 'ImmunizationEvaluation', 'ImmunizationRecommendation', 'ImplementationGuide', 'InsurancePlan', 'Invoice', 'Library', 'Linkage', 'List', 'Measure', 'MeasureReport', 'Media', 'Medication', 'MedicationAdministration', 'MedicationDispense', 'MedicationKnowledge', 'MedicationRequest', 'MedicationStatement', 'MedicinalProduct', 'MedicinalProductAuthorization', 'MedicinalProductContraindication', 'MedicinalProductIndication', 'MedicinalProductIngredient', 'MedicinalProductInteraction', 'MedicinalProductManufactured', 'MedicinalProductPackaged', 'MedicinalProductPharmaceutical', 'MedicinalProductUndesirableEffect', 'MessageDefinition', 'MessageHeader', 'MolecularSequence', 'NamingSystem', 'NutritionOrder', 'Observation', 'ObservationDefinition', 'OperationDefinition', 'OperationOutcome', 'OrganizationAffiliation', 'Parameters', 'PaymentNotice', 'PaymentReconciliation', 'Person', 'PlanDefinition', 'PractitionerRole', 'Procedure', 'Provenance', 'Questionnaire', 'QuestionnaireResponse', 'RelatedPerson', 'RequestGroup', 'ResearchDefinition', 'ResearchElementDefinition', 'ResearchStudy', 'ResearchSubject', 'Resource', 'RiskAssessment', 'RiskEvidenceSynthesis', 'Schedule', 'SearchParameter', 'ServiceRequest', 'Slot', 'Specimen', 'SpecimenDefinition', 'StructureDefinition', 'StructureMap', 'Subscription', 'Substance', 'SubstanceNucleicAcid', 'SubstancePolymer', 'SubstanceProtein', 'SubstanceReferenceInformation', 'SubstanceSourceMaterial', 'SubstanceSpecification', 'SupplyDelivery', 'SupplyRequest', 'Task', 'TerminologyCapabilities', 'TestReport', 'TestScript', 'ValueSet', 'VerificationResult', 'VisionPrescription']}, 'type'=>'CodeableConcept', 'path'=>'Library.subject[x]', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/subject-type'}}, + 'subjectReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Group'], 'type'=>'Reference', 'path'=>'Library.subject[x]', 'min'=>0, 'max'=>1}, 'date' => {'type'=>'dateTime', 'path'=>'Library.date', 'min'=>0, 'max'=>1}, 'publisher' => {'type'=>'string', 'path'=>'Library.publisher', 'min'=>0, 'max'=>1}, + 'contact' => {'type'=>'ContactDetail', 'path'=>'Library.contact', 'min'=>0, 'max'=>Float::INFINITY}, 'description' => {'type'=>'markdown', 'path'=>'Library.description', 'min'=>0, 'max'=>1}, + 'useContext' => {'type'=>'UsageContext', 'path'=>'Library.useContext', 'min'=>0, 'max'=>Float::INFINITY}, + 'jurisdiction' => {'type'=>'CodeableConcept', 'path'=>'Library.jurisdiction', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/jurisdiction'}}, 'purpose' => {'type'=>'markdown', 'path'=>'Library.purpose', 'min'=>0, 'max'=>1}, 'usage' => {'type'=>'string', 'path'=>'Library.usage', 'min'=>0, 'max'=>1}, + 'copyright' => {'type'=>'markdown', 'path'=>'Library.copyright', 'min'=>0, 'max'=>1}, 'approvalDate' => {'type'=>'date', 'path'=>'Library.approvalDate', 'min'=>0, 'max'=>1}, 'lastReviewDate' => {'type'=>'date', 'path'=>'Library.lastReviewDate', 'min'=>0, 'max'=>1}, 'effectivePeriod' => {'type'=>'Period', 'path'=>'Library.effectivePeriod', 'min'=>0, 'max'=>1}, - 'useContext' => {'type'=>'UsageContext', 'path'=>'Library.useContext', 'min'=>0, 'max'=>Float::INFINITY}, - 'jurisdiction' => {'valid_codes'=>{'urn:iso:std:iso:3166'=>['AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AN', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BU', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CS', 'CT', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DD', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DY', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FQ', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'HV', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'JT', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MI', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NH', 'NI', 'NL', 'NO', 'NP', 'NQ', 'NR', 'NT', 'NU', 'NZ', 'OM', 'PA', 'PC', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PU', 'PW', 'PY', 'PZ', 'QA', 'RE', 'RH', 'RO', 'RS', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SU', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TP', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VD', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WK', 'WS', 'YD', 'YE', 'YT', 'YU', 'ZA', 'ZM', 'ZR', 'ZW'], 'http://unstats.un.org/unsd/methods/m49/m49.htm'=>['001', '002', '014', '017', '015', '018', '011', '019', '419', '029', '013', '005', '021', '142', '143', '030', '034', '035', '145', '150', '151', '154', '039', '155', '009', '053', '054', '057', '061'], 'https://www.usps.com/'=>['AK', 'AL', 'AR', 'AS', 'AZ', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'FM', 'GA', 'GU', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MH', 'MI', 'MN', 'MO', 'MP', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'PR', 'PW', 'RI', 'SC', 'SD', 'TN', 'TX', 'UM', 'UT', 'VA', 'VI', 'VT', 'WA', 'WI', 'WV', 'WY'], nil=>[]}, 'type'=>'CodeableConcept', 'path'=>'Library.jurisdiction', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/jurisdiction'}}, - 'topic' => {'valid_codes'=>{'http://hl7.org/fhir/definition-topic'=>['treatment', 'education', 'assessment']}, 'type'=>'CodeableConcept', 'path'=>'Library.topic', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/definition-topic'}}, - 'contributor' => {'type'=>'Contributor', 'path'=>'Library.contributor', 'min'=>0, 'max'=>Float::INFINITY}, - 'contact' => {'type'=>'ContactDetail', 'path'=>'Library.contact', 'min'=>0, 'max'=>Float::INFINITY}, - 'copyright' => {'type'=>'markdown', 'path'=>'Library.copyright', 'min'=>0, 'max'=>1}, + 'topic' => {'valid_codes'=>{'http://terminology.hl7.org/CodeSystem/definition-topic'=>['treatment', 'education', 'assessment']}, 'type'=>'CodeableConcept', 'path'=>'Library.topic', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/definition-topic'}}, + 'author' => {'type'=>'ContactDetail', 'path'=>'Library.author', 'min'=>0, 'max'=>Float::INFINITY}, + 'editor' => {'type'=>'ContactDetail', 'path'=>'Library.editor', 'min'=>0, 'max'=>Float::INFINITY}, + 'reviewer' => {'type'=>'ContactDetail', 'path'=>'Library.reviewer', 'min'=>0, 'max'=>Float::INFINITY}, + 'endorser' => {'type'=>'ContactDetail', 'path'=>'Library.endorser', 'min'=>0, 'max'=>Float::INFINITY}, 'relatedArtifact' => {'type'=>'RelatedArtifact', 'path'=>'Library.relatedArtifact', 'min'=>0, 'max'=>Float::INFINITY}, 'parameter' => {'type'=>'ParameterDefinition', 'path'=>'Library.parameter', 'min'=>0, 'max'=>Float::INFINITY}, 'dataRequirement' => {'type'=>'DataRequirement', 'path'=>'Library.dataRequirement', 'min'=>0, 'max'=>Float::INFINITY}, 'content' => {'type'=>'Attachment', 'path'=>'Library.content', 'min'=>0, 'max'=>Float::INFINITY} } - attr_accessor :id # 0-1 id - attr_accessor :meta # 0-1 Meta - attr_accessor :implicitRules # 0-1 uri - attr_accessor :language # 0-1 code - attr_accessor :text # 0-1 Narrative - attr_accessor :contained # 0-* [ Resource ] - attr_accessor :extension # 0-* [ Extension ] - attr_accessor :modifierExtension # 0-* [ Extension ] - attr_accessor :url # 0-1 uri - attr_accessor :identifier # 0-* [ Identifier ] - attr_accessor :version # 0-1 string - attr_accessor :name # 0-1 string - attr_accessor :title # 0-1 string - attr_accessor :status # 1-1 code - attr_accessor :experimental # 0-1 boolean - attr_accessor :type # 1-1 CodeableConcept - attr_accessor :date # 0-1 dateTime - attr_accessor :publisher # 0-1 string - attr_accessor :description # 0-1 markdown - attr_accessor :purpose # 0-1 markdown - attr_accessor :usage # 0-1 string - attr_accessor :approvalDate # 0-1 date - attr_accessor :lastReviewDate # 0-1 date - attr_accessor :effectivePeriod # 0-1 Period - attr_accessor :useContext # 0-* [ UsageContext ] - attr_accessor :jurisdiction # 0-* [ CodeableConcept ] - attr_accessor :topic # 0-* [ CodeableConcept ] - attr_accessor :contributor # 0-* [ Contributor ] - attr_accessor :contact # 0-* [ ContactDetail ] - attr_accessor :copyright # 0-1 markdown - attr_accessor :relatedArtifact # 0-* [ RelatedArtifact ] - attr_accessor :parameter # 0-* [ ParameterDefinition ] - attr_accessor :dataRequirement # 0-* [ DataRequirement ] - attr_accessor :content # 0-* [ Attachment ] + attr_accessor :id # 0-1 id + attr_accessor :meta # 0-1 Meta + attr_accessor :implicitRules # 0-1 uri + attr_accessor :language # 0-1 code + attr_accessor :text # 0-1 Narrative + attr_accessor :contained # 0-* [ Resource ] + attr_accessor :extension # 0-* [ Extension ] + attr_accessor :modifierExtension # 0-* [ Extension ] + attr_accessor :url # 0-1 uri + attr_accessor :identifier # 0-* [ Identifier ] + attr_accessor :version # 0-1 string + attr_accessor :name # 0-1 string + attr_accessor :title # 0-1 string + attr_accessor :subtitle # 0-1 string + attr_accessor :status # 1-1 code + attr_accessor :experimental # 0-1 boolean + attr_accessor :type # 1-1 CodeableConcept + attr_accessor :subjectCodeableConcept # 0-1 CodeableConcept + attr_accessor :subjectReference # 0-1 Reference(Group) + attr_accessor :date # 0-1 dateTime + attr_accessor :publisher # 0-1 string + attr_accessor :contact # 0-* [ ContactDetail ] + attr_accessor :description # 0-1 markdown + attr_accessor :useContext # 0-* [ UsageContext ] + attr_accessor :jurisdiction # 0-* [ CodeableConcept ] + attr_accessor :purpose # 0-1 markdown + attr_accessor :usage # 0-1 string + attr_accessor :copyright # 0-1 markdown + attr_accessor :approvalDate # 0-1 date + attr_accessor :lastReviewDate # 0-1 date + attr_accessor :effectivePeriod # 0-1 Period + attr_accessor :topic # 0-* [ CodeableConcept ] + attr_accessor :author # 0-* [ ContactDetail ] + attr_accessor :editor # 0-* [ ContactDetail ] + attr_accessor :reviewer # 0-* [ ContactDetail ] + attr_accessor :endorser # 0-* [ ContactDetail ] + attr_accessor :relatedArtifact # 0-* [ RelatedArtifact ] + attr_accessor :parameter # 0-* [ ParameterDefinition ] + attr_accessor :dataRequirement # 0-* [ DataRequirement ] + attr_accessor :content # 0-* [ Attachment ] def resourceType 'Library' end end \ No newline at end of file