Class: FHIR::Contract

Inherits:
Model
  • Object
show all
Includes:
Hashable, Json, Xml
Defined in:
lib/fhir_models/fhir/resources/Contract.rb

Defined Under Namespace

Classes: ContentDefinition, Friendly, Legal, Rule, Signer, Term

Constant Summary collapse

MULTIPLE_TYPES =
{
  'topic' => ['CodeableConcept', 'Reference'],
  'legallyBinding' => ['Attachment', 'Reference']
}
SEARCH_PARAMS =
['authority', 'domain', 'identifier', 'instantiates', 'issued', 'patient', 'signer', 'status', 'subject', 'url']
METADATA =
{
  'id' => {'type'=>'id', 'path'=>'Contract.id', 'min'=>0, 'max'=>1},
  'meta' => {'type'=>'Meta', 'path'=>'Contract.meta', 'min'=>0, 'max'=>1},
  'implicitRules' => {'type'=>'uri', 'path'=>'Contract.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', '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'=>'Contract.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'preferred', 'uri'=>'http://hl7.org/fhir/ValueSet/languages'}},
  'text' => {'type'=>'Narrative', 'path'=>'Contract.text', 'min'=>0, 'max'=>1},
  'contained' => {'type'=>'Resource', 'path'=>'Contract.contained', 'min'=>0, 'max'=>Float::INFINITY},
  'extension' => {'type'=>'Extension', 'path'=>'Contract.extension', 'min'=>0, 'max'=>Float::INFINITY},
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Contract.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
  'identifier' => {'type'=>'Identifier', 'path'=>'Contract.identifier', 'min'=>0, 'max'=>Float::INFINITY},
  'url' => {'type'=>'uri', 'path'=>'Contract.url', 'min'=>0, 'max'=>1},
  'version' => {'type'=>'string', 'path'=>'Contract.version', 'min'=>0, 'max'=>1},
  'status' => {'valid_codes'=>{'http://hl7.org/fhir/contract-status'=>['amended', 'appended', 'cancelled', 'disputed', 'entered-in-error', 'executable', 'executed', 'negotiable', 'offered', 'policy', 'rejected', 'renewed', 'revoked', 'resolved', 'terminated']}, 'type'=>'code', 'path'=>'Contract.status', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-status|4.0.0'}},
  'legalState' => {'valid_codes'=>{'http://hl7.org/fhir/contract-legalstate'=>['amended', 'appended', 'cancelled', 'disputed', 'entered-in-error', 'executable', 'executed', 'negotiable', 'offered', 'policy', 'rejected', 'renewed', 'revoked', 'resolved', 'terminated']}, 'type'=>'CodeableConcept', 'path'=>'Contract.legalState', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-legalstate'}},
  'instantiatesCanonical' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Contract'], 'type'=>'Reference', 'path'=>'Contract.instantiatesCanonical', 'min'=>0, 'max'=>1},
  'instantiatesUri' => {'type'=>'uri', 'path'=>'Contract.instantiatesUri', 'min'=>0, 'max'=>1},
  'contentDerivative' => {'valid_codes'=>{'http://terminology.hl7.org/CodeSystem/contract-content-derivative'=>['registration', 'retrieval', 'statement', 'shareable']}, 'type'=>'CodeableConcept', 'path'=>'Contract.contentDerivative', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-content-derivative'}},
  'issued' => {'type'=>'dateTime', 'path'=>'Contract.issued', 'min'=>0, 'max'=>1},
  'applies' => {'type'=>'Period', 'path'=>'Contract.applies', 'min'=>0, 'max'=>1},
  'expirationType' => {'valid_codes'=>{'http://hl7.org/fhir/contract-expiration-type'=>['breach']}, 'type'=>'CodeableConcept', 'path'=>'Contract.expirationType', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-expiration-type'}},
  'subject' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Contract.subject', 'min'=>0, 'max'=>Float::INFINITY},
  'authority' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Contract.authority', 'min'=>0, 'max'=>Float::INFINITY},
  'domain' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Contract.domain', 'min'=>0, 'max'=>Float::INFINITY},
  'site' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Contract.site', 'min'=>0, 'max'=>Float::INFINITY},
  'name' => {'type'=>'string', 'path'=>'Contract.name', 'min'=>0, 'max'=>1},
  'title' => {'type'=>'string', 'path'=>'Contract.title', 'min'=>0, 'max'=>1},
  'subtitle' => {'type'=>'string', 'path'=>'Contract.subtitle', 'min'=>0, 'max'=>1},
  'alias' => {'type'=>'string', 'path'=>'Contract.alias', 'min'=>0, 'max'=>Float::INFINITY},
  'author' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/PractitionerRole', 'http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Contract.author', 'min'=>0, 'max'=>1},
  'scope' => {'valid_codes'=>{'http://hl7.org/fhir/contract-scope'=>['policy']}, 'type'=>'CodeableConcept', 'path'=>'Contract.scope', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-scope'}},
  'topicCodeableConcept' => {'type'=>'CodeableConcept', 'path'=>'Contract.topic[x]', 'min'=>0, 'max'=>1},
  'topicReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Contract.topic[x]', 'min'=>0, 'max'=>1},
  'type' => {'valid_codes'=>{'http://terminology.hl7.org/CodeSystem/contract-type'=>['privacy', 'disclosure', 'healthinsurance', 'supply', 'consent']}, 'type'=>'CodeableConcept', 'path'=>'Contract.type', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-type'}},
  'subType' => {'valid_codes'=>{'http://terminology.hl7.org/CodeSystem/contractsubtypecodes'=>['disclosure-ca', 'disclosure-us']}, 'type'=>'CodeableConcept', 'path'=>'Contract.subType', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/contract-subtype'}},
  'contentDefinition' => {'type'=>'Contract::ContentDefinition', 'path'=>'Contract.contentDefinition', 'min'=>0, 'max'=>1},
  'term' => {'type'=>'Contract::Term', 'path'=>'Contract.term', 'min'=>0, 'max'=>Float::INFINITY},
  'supportingInfo' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Contract.supportingInfo', 'min'=>0, 'max'=>Float::INFINITY},
  'relevantHistory' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Provenance'], 'type'=>'Reference', 'path'=>'Contract.relevantHistory', 'min'=>0, 'max'=>Float::INFINITY},
  'signer' => {'type'=>'Contract::Signer', 'path'=>'Contract.signer', 'min'=>0, 'max'=>Float::INFINITY},
  'friendly' => {'type'=>'Contract::Friendly', 'path'=>'Contract.friendly', 'min'=>0, 'max'=>Float::INFINITY},
  'legal' => {'type'=>'Contract::Legal', 'path'=>'Contract.legal', 'min'=>0, 'max'=>Float::INFINITY},
  'rule' => {'type'=>'Contract::Rule', 'path'=>'Contract.rule', 'min'=>0, 'max'=>Float::INFINITY},
  'legallyBindingAttachment' => {'type'=>'Attachment', 'path'=>'Contract.legallyBinding[x]', 'min'=>0, 'max'=>1},
  'legallyBindingReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Composition', 'http://hl7.org/fhir/StructureDefinition/DocumentReference', 'http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse', 'http://hl7.org/fhir/StructureDefinition/Contract'], 'type'=>'Reference', 'path'=>'Contract.legallyBinding[x]', 'min'=>0, 'max'=>1}
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Xml

from_xml, #to_xml, valid?, validate

Methods included from Deprecate

#deprecate

Methods included from Json

from_json, #to_json

Methods included from Hashable

#from_hash, #to_hash

Methods inherited from Model

#==, #attribute_mismatch, #compare_attribute, #equals?, #hash, #initialize, #method_missing, #mismatch, #primitive?, #to_reference, #valid?, #validate, #validate_profile

Constructor Details

This class inherits a constructor from FHIR::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class FHIR::Model

Instance Attribute Details

#aliasObject

0-* [ string ]



573
574
575
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 573

def alias
  @alias
end

#appliesObject

0-1 Period



564
565
566
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 564

def applies
  @applies
end

#authorObject

0-1 Reference(Patient|Practitioner|PractitionerRole|Organization)



574
575
576
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 574

def author
  @author
end

#authorityObject

0-* [ Reference(Organization) ]



567
568
569
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 567

def authority
  @authority
end

#containedObject

0-* [ Resource ]



552
553
554
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 552

def contained
  @contained
end

#contentDefinitionObject

0-1 Contract::ContentDefinition



580
581
582
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 580

def contentDefinition
  @contentDefinition
end

#contentDerivativeObject

0-1 CodeableConcept



562
563
564
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 562

def contentDerivative
  @contentDerivative
end

#domainObject

0-* [ Reference(Location) ]



568
569
570
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 568

def domain
  @domain
end

#expirationTypeObject

0-1 CodeableConcept



565
566
567
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 565

def expirationType
  @expirationType
end

#extensionObject

0-* [ Extension ]



553
554
555
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 553

def extension
  @extension
end

#friendlyObject

0-* [ Contract::Friendly ]



585
586
587
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 585

def friendly
  @friendly
end

#idObject

0-1 id



547
548
549
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 547

def id
  @id
end

#identifierObject

0-* [ Identifier ]



555
556
557
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 555

def identifier
  @identifier
end

#implicitRulesObject

0-1 uri



549
550
551
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 549

def implicitRules
  @implicitRules
end

#instantiatesCanonicalObject

0-1 Reference(Contract)



560
561
562
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 560

def instantiatesCanonical
  @instantiatesCanonical
end

#instantiatesUriObject

0-1 uri



561
562
563
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 561

def instantiatesUri
  @instantiatesUri
end

#issuedObject

0-1 dateTime



563
564
565
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 563

def issued
  @issued
end

#languageObject

0-1 code



550
551
552
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 550

def language
  @language
end

0-* [ Contract::Legal ]



586
587
588
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 586

def legal
  @legal
end

#legallyBindingAttachmentObject

0-1 Attachment



588
589
590
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 588

def legallyBindingAttachment
  @legallyBindingAttachment
end

#legallyBindingReferenceObject

0-1 Reference(Composition|DocumentReference|QuestionnaireResponse|Contract)



589
590
591
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 589

def legallyBindingReference
  @legallyBindingReference
end

#legalStateObject

0-1 CodeableConcept



559
560
561
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 559

def legalState
  @legalState
end

#metaObject

0-1 Meta



548
549
550
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 548

def meta
  @meta
end

#modifierExtensionObject

0-* [ Extension ]



554
555
556
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 554

def modifierExtension
  @modifierExtension
end

#nameObject

0-1 string



570
571
572
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 570

def name
  @name
end

#relevantHistoryObject

0-* [ Reference(Provenance) ]



583
584
585
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 583

def relevantHistory
  @relevantHistory
end

#ruleObject

0-* [ Contract::Rule ]



587
588
589
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 587

def rule
  @rule
end

#scopeObject

0-1 CodeableConcept



575
576
577
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 575

def scope
  @scope
end

#signerObject

0-* [ Contract::Signer ]



584
585
586
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 584

def signer
  @signer
end

#siteObject

0-* [ Reference(Location) ]



569
570
571
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 569

def site
  @site
end

#statusObject

0-1 code



558
559
560
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 558

def status
  @status
end

#subjectObject

0-* [ Reference(Resource) ]



566
567
568
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 566

def subject
  @subject
end

#subtitleObject

0-1 string



572
573
574
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 572

def subtitle
  @subtitle
end

#subTypeObject

0-* [ CodeableConcept ]



579
580
581
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 579

def subType
  @subType
end

#supportingInfoObject

0-* [ Reference(Resource) ]



582
583
584
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 582

def supportingInfo
  @supportingInfo
end

#termObject

0-* [ Contract::Term ]



581
582
583
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 581

def term
  @term
end

#textObject

0-1 Narrative



551
552
553
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 551

def text
  @text
end

#titleObject

0-1 string



571
572
573
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 571

def title
  @title
end

#topicCodeableConceptObject

0-1 CodeableConcept



576
577
578
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 576

def topicCodeableConcept
  @topicCodeableConcept
end

#topicReferenceObject

0-1 Reference(Resource)



577
578
579
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 577

def topicReference
  @topicReference
end

#typeObject

0-1 CodeableConcept



578
579
580
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 578

def type
  @type
end

#urlObject

0-1 uri



556
557
558
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 556

def url
  @url
end

#versionObject

0-1 string



557
558
559
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 557

def version
  @version
end

Instance Method Details

#resourceTypeObject



591
592
593
# File 'lib/fhir_models/fhir/resources/Contract.rb', line 591

def resourceType
  'Contract'
end