Class: FHIR::Consent

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

Defined Under Namespace

Classes: Actor, Data, Except, Policy

Constant Summary collapse

MULTIPLE_TYPES =
{
  'source' => ['Attachment', 'Identifier', 'Reference']
}
SEARCH_PARAMS =
['date', 'identifier', 'patient', 'action', 'actor', 'category', 'consentor', 'data', 'organization', 'period', 'purpose', 'securitylabel', 'source', 'status']
METADATA =
{
  'id' => {'type'=>'id', 'path'=>'Consent.id', 'min'=>0, 'max'=>1},
  'meta' => {'type'=>'Meta', 'path'=>'Consent.meta', 'min'=>0, 'max'=>1},
  'implicitRules' => {'type'=>'uri', 'path'=>'Consent.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'=>'Consent.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/languages'}},
  'text' => {'type'=>'Narrative', 'path'=>'Consent.text', 'min'=>0, 'max'=>1},
  'contained' => {'type'=>'Resource', 'path'=>'Consent.contained', 'min'=>0, 'max'=>Float::INFINITY},
  'extension' => {'type'=>'Extension', 'path'=>'Consent.extension', 'min'=>0, 'max'=>Float::INFINITY},
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Consent.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
  'identifier' => {'type'=>'Identifier', 'path'=>'Consent.identifier', 'min'=>0, 'max'=>1},
  'status' => {'valid_codes'=>{'http://hl7.org/fhir/consent-state-codes'=>['draft', 'proposed', 'active', 'rejected', 'inactive', 'entered-in-error']}, 'type'=>'code', 'path'=>'Consent.status', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/consent-state-codes'}},
  'category' => {'valid_codes'=>{'http://hl7.org/fhir/consentcategorycodes'=>['42-CFR-2', 'ACD', 'CRIC', 'DNR', 'EMRGONLY', 'Illinois-Minor-Procedure', 'HCD', 'HIPAA-Auth', 'HIPAA-NPP', 'HIPAA-Restrictions', 'HIPAA-Research', 'HIPAA-Self-Pay', 'MDHHS-5515', 'NYSSIPP', 'NPP', 'POLST', 'RESEARCH', 'RSDID', 'RSREID', 'SSA-827', 'VA-10-0484', 'VA-10-0485', 'VA-10-5345', 'VA-10-5345a', 'VA-10-5345a-MHV', 'VA-10-10116', 'VA-21-4142'], 'http://hl7.org/fhir/v3/ActCode'=>['ICOL', 'IDSCL', 'INFA', 'INFAO', 'INFASO', 'IRDSCL', 'RESEARCH', 'RSDID', 'RSREID'], 'http://loinc.org'=>['59284-0', '57016-8', '57017-6', '64292-6'], nil=>[]}, 'type'=>'CodeableConcept', 'path'=>'Consent.category', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/consent-category'}},
  'patient' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'Consent.patient', 'min'=>1, 'max'=>1},
  'period' => {'type'=>'Period', 'path'=>'Consent.period', 'min'=>0, 'max'=>1},
  'dateTime' => {'type'=>'dateTime', 'path'=>'Consent.dateTime', 'min'=>0, 'max'=>1},
  'consentingParty' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization', 'http://hl7.org/fhir/StructureDefinition/Patient', 'http://hl7.org/fhir/StructureDefinition/Practitioner', 'http://hl7.org/fhir/StructureDefinition/RelatedPerson'], 'type'=>'Reference', 'path'=>'Consent.consentingParty', 'min'=>0, 'max'=>Float::INFINITY},
  'actor' => {'type'=>'Consent::Actor', 'path'=>'Consent.actor', 'min'=>0, 'max'=>Float::INFINITY},
  'action' => {'valid_codes'=>{'http://hl7.org/fhir/consentaction'=>['collect', 'access', 'use', 'disclose', 'correct']}, 'type'=>'CodeableConcept', 'path'=>'Consent.action', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/consent-action'}},
  'organization' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Consent.organization', 'min'=>0, 'max'=>Float::INFINITY},
  'sourceAttachment' => {'type'=>'Attachment', 'path'=>'Consent.source[x]', 'min'=>0, 'max'=>1},
  'sourceIdentifier' => {'type'=>'Identifier', 'path'=>'Consent.source[x]', 'min'=>0, 'max'=>1},
  'sourceReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Consent', 'http://hl7.org/fhir/StructureDefinition/DocumentReference', 'http://hl7.org/fhir/StructureDefinition/Contract', 'http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse'], 'type'=>'Reference', 'path'=>'Consent.source[x]', 'min'=>0, 'max'=>1},
  'policy' => {'type'=>'Consent::Policy', 'path'=>'Consent.policy', 'min'=>0, 'max'=>Float::INFINITY},
  'policyRule' => {'type'=>'uri', 'path'=>'Consent.policyRule', 'min'=>0, 'max'=>1},
  'securityLabel' => {'valid_codes'=>{'http://hl7.org/fhir/v3/Confidentiality'=>['U', 'L', 'M', 'N', 'R', 'V'], 'http://hl7.org/fhir/v3/ActCode'=>['ETH', 'GDIS', 'HIV', 'PSY', 'SCA', 'SOC', 'SDV', 'SEX', 'STD', 'TBOO', 'SICKLE', 'DEMO', 'DOB', 'GENDER', 'LIVARG', 'MARST', 'RACE', 'REL', 'B', 'EMPL', 'LOCIS', 'SSP', 'ADOL', 'CEL', 'DIA', 'DRGIS', 'EMP', 'PDS', 'PRS', 'COMPT', 'HRCOMPT', 'RESCOMPT', 'RMGTCOMPT', 'SecurityPolicy', 'ObligationPolicy', 'ANONY', 'AOD', 'AUDIT', 'AUDTR', 'CPLYCC', 'CPLYCD', 'CPLYJPP', 'CPLYOPP', 'CPLYOSP', 'CPLYPOL', 'DECLASSIFYLABEL', 'DEID', 'DELAU', 'DOWNGRDLABEL', 'DRIVLABEL', 'ENCRYPT', 'ENCRYPTR', 'ENCRYPTT', 'ENCRYPTU', 'HUAPRV', 'LABEL', 'MASK', 'MINEC', 'PERSISTLABEL', 'PRIVMARK', 'PSEUD', 'REDACT', 'UPGRDLABEL', 'RefrainPolicy', 'NOAUTH', 'NOCOLLECT', 'NODSCLCD', 'NODSCLCDS', 'NOINTEGRATE', 'NOLIST', 'NOMOU', 'NOORGPOL', 'NOPAT', 'NOPERSISTP', 'NORDSCLCD', 'NORDSCLCDS', 'NORDSCLW', 'NORELINK', 'NOREUSE', 'NOVIP', 'ORCON'], 'http://hl7.org/fhir/v3/ObservationValue'=>['ABSTRED', 'AGGRED', 'ANONYED', 'MAPPED', 'MASKED', 'PSEUDED', 'REDACTED', 'SUBSETTED', 'SYNTAC', 'TRSLT', 'VERSIONED', 'CRYTOHASH', 'DIGSIG', 'HRELIABLE', 'RELIABLE', 'UNCERTREL', 'UNRELIABLE', 'CLINAST', 'DEVAST', 'HCPAST', 'PACQAST', 'PATAST', 'PAYAST', 'PROAST', 'SDMAST', 'CLINRPT', 'DEVRPT', 'HCPRPT', 'PACQRPT', 'PATRPT', 'PAYRPT', 'PRORPT', 'SDMRPT'], 'http://hl7.org/fhir/v3/ActReason'=>['PurposeOfUse', 'HMARKT', 'HOPERAT', 'DONAT', 'FRAUD', 'GOV', 'HACCRED', 'HCOMPL', 'HDECD', 'HDIRECT', 'HLEGAL', 'HOUTCOMS', 'HPRGRP', 'HQUALIMP', 'HSYSADMIN', 'MEMADMIN', 'PATADMIN', 'PATSFTY', 'PERFMSR', 'RECORDMGT', 'TRAIN', 'HPAYMT', 'CLMATTCH', 'COVAUTH', 'COVERAGE', 'ELIGDTRM', 'ELIGVER', 'ENROLLM', 'REMITADV', 'HRESCH', 'CLINTRCH', 'PATRQT', 'FAMRQT', 'PWATRNY', 'SUPNWK', 'PUBHLTH', 'DISASTER', 'THREAT', 'TREAT', 'CAREMGT', 'CLINTRL', 'ETREAT', 'POPHLTH'], 'http://hl7.org/fhir/v3/ActUSPrivacyLaw'=>['_ActUSPrivacyLaw', '42CFRPart2', 'CommonRule', 'HIPAANOPP', 'HIPAAPsyNotes', 'HIPAASelfPay', 'Title38Section7332'], nil=>[]}, 'type'=>'Coding', 'path'=>'Consent.securityLabel', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/security-labels'}},
  'purpose' => {'valid_codes'=>{'http://hl7.org/fhir/v3/ActReason'=>['PurposeOfUse', 'HMARKT', 'HOPERAT', 'DONAT', 'FRAUD', 'GOV', 'HACCRED', 'HCOMPL', 'HDECD', 'HDIRECT', 'HLEGAL', 'HOUTCOMS', 'HPRGRP', 'HQUALIMP', 'HSYSADMIN', 'MEMADMIN', 'PATADMIN', 'PATSFTY', 'PERFMSR', 'RECORDMGT', 'TRAIN', 'HPAYMT', 'CLMATTCH', 'COVAUTH', 'COVERAGE', 'ELIGDTRM', 'ELIGVER', 'ENROLLM', 'REMITADV', 'HRESCH', 'CLINTRCH', 'PATRQT', 'FAMRQT', 'PWATRNY', 'SUPNWK', 'PUBHLTH', 'DISASTER', 'THREAT', 'TREAT', 'CAREMGT', 'CLINTRL', 'ETREAT', 'POPHLTH']}, 'type'=>'Coding', 'path'=>'Consent.purpose', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/v3-PurposeOfUse'}},
  'dataPeriod' => {'type'=>'Period', 'path'=>'Consent.dataPeriod', 'min'=>0, 'max'=>1},
  'data' => {'type'=>'Consent::Data', 'path'=>'Consent.data', 'min'=>0, 'max'=>Float::INFINITY},
  'except' => {'type'=>'Consent::Except', 'path'=>'Consent.except', 'min'=>0, 'max'=>Float::INFINITY}
}

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

#actionObject

0-* [ CodeableConcept ]



194
195
196
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 194

def action
  @action
end

#actorObject

0-* [ Consent::Actor ]



193
194
195
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 193

def actor
  @actor
end

#categoryObject

0-* [ CodeableConcept ]



188
189
190
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 188

def category
  @category
end

#consentingPartyObject

0-* [ Reference(Organization|Patient|Practitioner|RelatedPerson) ]



192
193
194
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 192

def consentingParty
  @consentingParty
end

#containedObject

0-* [ Resource ]



183
184
185
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 183

def contained
  @contained
end

#dataObject

0-* [ Consent::Data ]



204
205
206
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 204

def data
  @data
end

#dataPeriodObject

0-1 Period



203
204
205
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 203

def dataPeriod
  @dataPeriod
end

#dateTimeObject

0-1 dateTime



191
192
193
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 191

def dateTime
  @dateTime
end

#exceptObject

0-* [ Consent::Except ]



205
206
207
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 205

def except
  @except
end

#extensionObject

0-* [ Extension ]



184
185
186
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 184

def extension
  @extension
end

#idObject

0-1 id



178
179
180
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 178

def id
  @id
end

#identifierObject

0-1 Identifier



186
187
188
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 186

def identifier
  @identifier
end

#implicitRulesObject

0-1 uri



180
181
182
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 180

def implicitRules
  @implicitRules
end

#languageObject

0-1 code



181
182
183
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 181

def language
  @language
end

#metaObject

0-1 Meta



179
180
181
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 179

def meta
  @meta
end

#modifierExtensionObject

0-* [ Extension ]



185
186
187
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 185

def modifierExtension
  @modifierExtension
end

#organizationObject

0-* [ Reference(Organization) ]



195
196
197
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 195

def organization
  @organization
end

#patientObject

1-1 Reference(Patient)



189
190
191
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 189

def patient
  @patient
end

#periodObject

0-1 Period



190
191
192
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 190

def period
  @period
end

#policyObject

0-* [ Consent::Policy ]



199
200
201
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 199

def policy
  @policy
end

#policyRuleObject

0-1 uri



200
201
202
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 200

def policyRule
  @policyRule
end

#purposeObject

0-* [ Coding ]



202
203
204
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 202

def purpose
  @purpose
end

#securityLabelObject

0-* [ Coding ]



201
202
203
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 201

def securityLabel
  @securityLabel
end

#sourceAttachmentObject

0-1 Attachment



196
197
198
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 196

def sourceAttachment
  @sourceAttachment
end

#sourceIdentifierObject

0-1 Identifier



197
198
199
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 197

def sourceIdentifier
  @sourceIdentifier
end

#sourceReferenceObject

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



198
199
200
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 198

def sourceReference
  @sourceReference
end

#statusObject

1-1 code



187
188
189
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 187

def status
  @status
end

#textObject

0-1 Narrative



182
183
184
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 182

def text
  @text
end

Instance Method Details

#resourceTypeObject



207
208
209
# File 'lib/fhir_models/fhir/resources/Consent.rb', line 207

def resourceType
  'Consent'
end