Class: FHIR::STU3::Medication

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

Defined Under Namespace

Classes: Ingredient, Package

Constant Summary collapse

SEARCH_PARAMS =
['code', 'container', 'form', 'ingredient', 'ingredient-code', 'manufacturer', 'over-the-counter', 'package-item', 'package-item-code', 'status']
METADATA =
{
  'id' => {'type'=>'id', 'path'=>'Medication.id', 'min'=>0, 'max'=>1},
  'meta' => {'type'=>'Meta', 'path'=>'Medication.meta', 'min'=>0, 'max'=>1},
  'implicitRules' => {'type'=>'uri', 'path'=>'Medication.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'=>'Medication.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/languages'}},
  'text' => {'type'=>'Narrative', 'path'=>'Medication.text', 'min'=>0, 'max'=>1},
  'contained' => {'type'=>'Resource', 'path'=>'Medication.contained', 'min'=>0, 'max'=>Float::INFINITY},
  'extension' => {'type'=>'Extension', 'path'=>'Medication.extension', 'min'=>0, 'max'=>Float::INFINITY},
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Medication.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
  'code' => {'valid_codes'=>{'http://snomed.info/sct'=>['261000', '336001', '363000', '519005', '585007', '693002', '698006', '699003', '747006', '873008', '925002', '1018001', '1025008', '1057009', '1091008', '1171004', '1190007', '1244009', '1269009', '1325004', '1336006', '1355006', '1368003', '1381005', '1450002', '1476002', '1536005', '1575001', '1603001', '1668008', '1914001', '1944003', '1956002', '1971003', '2029004', '2125008', '2195004', '2197007', '2201007', '2212007', '2215009', '2249001', '2264001', '2346005', '2537003', '2660003', '2680002', '2796008', '2799001', '2869004', '2878005', '2927004', '2958003', '2964005', '2991007', '2995003', '3031003', '3066001', '3087006', '3136005', '3142009', '3145006', '3209002', '3212004', '3225007', '3342004', '3378009', '3379001', '3501003', '3592004', '3597005', '3617004', '3672002', '3693004', '3793006', '3823007', '3829006', '3874004', '3906002', '3932008', '3941003', '3945007', '3983008', '4014000', '4025009', '4043008', '4076007', '4188007', '4203009', '4334005', '4353000', '4355007', '4413004', '4423008', '4480008', '4518006', '4616002', '4681002', '4700006', '4780009', '4814001', '4844003', '5007006', '5142007', '5167005', '5172001', '5220000', '5312000', '5405008', '5477001', '5641004', '5647000', '5657004', '5681006', '5691000', '5699003', '5739006', '5767002', '5774007', '5907009', '5955009', '6054001', '6088007', '6162007', '6237004', '6260007', '6333002', '6394006', '6495008', '6513000', '6524003', '6602005', '6612003', '6710000', '6717002', '6790004', '6809003', '6826009', '6837005', '6865007', '6873003', '6881002', '6910009', '6927001', '6952004', '6992002', '7034005', '7084003', '7156005', '7179006', '7302008', '7318002', '7328006', '7348004', '7451005', '7509000', '7515000', '7549008', '7608003', '7737009', '7770004', '7774008', '7816005', '7834009', '7904003', '7975001', '8030004', '8143001', '8202008', '8203003', '8222007', '8252004', '8397006', '8450009', '8534003', '8631001', '8689007', '8701002', '8767001', '8886003', '8919000', '8987006', '9174005', '9234005', '9271007', '9396007', '9457002', '9471005', '9530002', '9532005', '9539001', '9643009', '9663002', '9676008', '9680003', '9721008', '9765000', '9797000', '9817005', '9910008', '9974009', '9992001', '10016008', '10020007', '10109009', '10133003', '10174003', '10192006', '10202007', '10240005', '10270000', '10282009', '10324005', '10329000', '10333007', '10342000', '10354000', '10377000', '10424009', '10466005', '10471003', '10500003', '10534002', '10595003', '10644005', '10660009', '10682002', '10730008', '10750007', '10751006', '10767000', '10782005', '10790005', '10843002', '10955007', '11036001', '11038000', '11115001', '11121002', '11137008', '11170003', '11202003', '11331001', '11345007', '11420005', '11473005', '11496005', '11504003', '11633008', '11644000', '11652002', '11714005', '11943009', '11984007', '11986009', '12009000', '12034000', '12177002', '12208001', '12218006', '12290003', '12315006', '12391001', '12525000', '12568004', '12578001', '12597001', '12689001', '12716009', '12801003', '12821002', '12870003', '12930006', '12970004', '13030002', '13150000', '13188003', '13235001', '13342004', '13502005', '13585009', '13668001', '13708006', '13787003', '13789000', '14013006', '14071002', '14146003', '14172007', '14193005', '14285000', '14312008', '14321009', '14340003', '14349002', '14399003', '14409006', '14438009', '14443002', '14461006', '14507006', '14638000', '14645000', '14715007', '14743003', '14767006', '14796007', '14819006', '14903000', '14905007', '15009009', '15017001', '15098005', '15129007', '15322006', '15331006', '15352003', '15505005', '15571002', '15660006', '15698006', '15730005', '15785009', '15810003', '15895007', '15901005', '16106007', '16125005', '16130009', '16214005', '16257000', '16276003', '16318005', '16355005', '16359004', '16392005', '16395007', '16462002', '16477005', '16492006', '16613008', '16624005', '16628008', '16670003', '16683002', '16717002', '16744007', '16745008', '16748005', '16808006', '16826009', '16915004', '16923002', '16946000', '17008002', '17062003', '17072000', '17117004', '17147002', '17212003', '17240008', '17243005', '17244004', '17356001', '17614005', '17731005', '17777001', '17798001', '17836006', '17916009', '17932007', '17942009', '17990002', '17991003', '18017000', '18039003', '18143001', '18220004', '18288009', '18321003', '18394004', '18414002', '18449009', '18462008', '18535002', '18550006', '18600008', '18616005', '18712002', '18815007', '18832006', '18852007', '18959002', '18970009', '19012003', '19041007', '19046002', '19114000', '19126005', '19163001', '19205004', '19421007', '19427006', '19462001', '19499001', '19510001', '19524002', '19595005', '19622008', '19839007', '19893005', '19918001', '19967004', '19978007', '20056006', '20170008', '20217007', '20229003', '20231007', '20238001', '20327004', '20340009', '20368008', '20378006', '20379003', '20413008', '20450009', '20468007', '20495002', '20686000', '20752000', '20771003', '20844009', '20847002', '20887007', '21028006', '21066009', '21075006', '21094001', '21168008', '21175009', '21235009', '21246007', '21289006', '21303006', '21373005', '21394008', '21518006', '21556007', '21559000', '21566004', '21568003', '21572004', '21611007', '21614004', '21706000', '21891005', '21903000', '21919007', '22038003', '22086005', '22165008', '22236007', '22242006', '22250002', '22362000', '22424004', '22453003', '22496008', '22606007', '22635004', '22654004', '22769006', '22779008', '22790003', '22792006', '22827004', '22840009', '22882008', '22941009', '22976006', '23053002', '23068001', '23077008', '23176001', '23295004', '23375008', '23433006', '23459009', '23564005', '23692005', '23701001', '23814005', '23816007', '23861006', '23862004', '23866001', '23883005', '23959001', '23969007', '24022008', '24202000', '24237002', '24261009', '24336008', '24357000', '24434007', '24435008', '24556008', '24570008', '24583009', '24650007', '24686008', '24721007', '24751001', '24809001', '24823004', '24838003', '24869004', '25002001', '25013003', '25027008', '25128000', '25141001', '25183006', '25204006', '25205007', '25213008', '25217009', '25254000', '25305005', '25307002', '25401000', '25500001', '25525005', '25538002', '25571003', '25607008', '25620006', '25710007', '25747007', '25796002', '25886000', '25911004', '26120001', '26191006', '26277008', '26288002', '26327007', '26346008', '26351002', '26371006', '26379008', '26437003', '26469007', '26518005', '26656004', '26817007', '26945002', '26992003', '27054007', '27079005', '27081007', '27082000', '27122000', '27184001', '27192005', '27244000', '27248002', '27345002', '27361000', '27499006', '27586005', '27594003', '27656005', '27730007', '27736001', '27766008', '27822002', '27928002', '27931001', '27989007', '28021008', '28029005', '28069006', '28121005', '28223003', '28268006', '28344001', '28421003', '28464005', '28521000', '28580002', '28588009', '28662003', '28702005', '28825003', '28829009', '28927005', '28942008', '28983006', '28999000', '29011006', '29184007', '29190006', '29301006', '29327006', '29406002', '29522004', '29527005', '29531004', '29584000', '29588002', '29666006', '29671004', '29725000', '29765001', '29783009', '29876006', '30034004', '30053009', '30094001', '30145004', '30178006', '30179003', '30203009', '30205002', '30236005', '30324001', '30325000', '30326004', '30329006', '30333004', '30424002', '30589007', '30658004', '30676006', '30745005', '30804005', '30820000', '30827002', '30848000', '30863002', '30990007', '31011004', '31055005', '31147000', '31178001', '31422009', '31522006', '31617001', '31622001', '31662002', '31706007', '31707003', '31731008', '31780003', '31787000', '31799007', '31801005', '31815007', '31818009', '31827005', '31895006', '31936008', '31990000', '32050003', '32083005', '32120008', '32133002', '32154009', '32157002', '32281001', '32370002', '32436002', '32437006', '32498003', '32505007', '32519007', '32707001', '32714004', '32757009', '32789000', '32800009', '32824001', '32836007', '32852005', '32898006', '32901007', '33280006', '33307008', '33396006', '33435008', '33440000', '33447002', '33535006', '33619005', '33635003', '33642003', '33667000', '33752008', '33837008', '33922005', '33963004', '34007009', '34070005', '34074001', '34086003', '34113002', '34120009', '34198005', '34211007', '34239008', '34274009', '34332002', '34425005', '34471003', '34654009', '34657002', '34658007', '34737006', '34915005', '34919004', '34953000', '34983009', '35060001', '35135004', '35150008', '35236008', '35257000', '35281007', '35318005', '35321007', '35343004', '35431001', '35466004', '35473009', '35605007', '35733004', '35748005', '35765001', '35864006', '35883004', '35903003', '35946000', '35954003', '35966009', '35976007', '36020009', '36021008', '36022001', '36136008', '36167005', '36173006', '36176003', '36235004', '36378007', '36380001', '36516003', '36541005', '36651003', '36661005', '36712003', '36872003', '36887008', '36953002', '37006008', '37013008', '37077000', '37078005', '37123002', '37225000', '37237003', '37262003', '37276002', '37352007', '37365003', '37411004', '37433002', '37451001', '37527009', '37648000', '37656002', '37691005', '37716005', '37751002', '37756007', '37758008', '37765000', '37951005', '37957009', '37978007', '37986007', '37994000', '38044001', '38122009', '38218009', '38245005', '38344006', '38399002', '38408002', '38543004', '38595007', '38622005', '38623000', '38648002', '38686006', '38714005', '38794009', '38909000', '38914001', '38937007', '39012008', '39044007', '39123009', '39152007', '39263003', '39292004', '39294003', '39428005', '39514001', '39546001', '39552000', '39808001', '39815009', '39933002', '39962001', '39972003', '39973008', '39979007', '40036000', '40115000', '40342009', '40404004', '40438007', '40534007', '40545005', '40601003', '40699008', '40710000', '40789008', '40924008', '40937006', '40940006', '41062004', '41067005', '41091001', '41143004', '41153003', '41199001', '41261002', '41332001', '41395001', '41410009', '41433005', '41464007', '41485007', '41492002', '41503000', '41509001', '41573001', '41592004', '41598000', '41722006', '41793006', '41834005', '41903005', '41945007', '41989007', '42033003', '42056007', '42145009', '42146005', '42159002', '42163009', '42180008', '42193003', '42212002', '42230009', '42319009', '42382009', '42464005', '42520004', '42549007', '42605004', '42671007', '42692007', '42710006', '42730005', '42761001', '42841002', '42877009', '43004008', '43032004', '43048003', '43136004', '43171004', '43239002', '43289005', '43332008', '43356007', '43440003', '43462003', '43538006', '43541002', '43585000', '43592005', '43597004', '43613009', '43621003', '43688007', '43698001', '43706004', '43784004', '43835003', '43848004', '43880002', '43897008', '43909000', '43989002', '44044007', '44068004', '44159003', '44234001', '44262008', '44293009', '44330008', '44347009', '44469001', '44508008', '44520000', '44555003', '44588005', '44603007', '44609006', '44624002', '44644008', '44681007', '44711006', '44776005', '44908000', '45084007', '45119009', '45158004', '45159007', '45207006', '45266004', '45483006', '45524001', '45555007', '45604009', '45754009', '45807004', '45940009', '45946003', '45960001', '46015007', '46021006', '46058006', '46097003', '46122001', '46134009', '46146008', '46191004', '46201000', '46225008', '46250006', '46257009', '46293006', '46492003', '46514003', '46558003', '46572007', '46654009', '46668002', '46711008', '46749007', '46861006', '46887006', '46921009', '46943001', '46950002', '47026005', '47176005', '47180000', '47192000', '47218005', '47247003', '47280005', '47336007', '47349002', '47350002', '47355007', '47383009', '47389008', '47408003', '47413004', '47414005', '47500008', '47663000']}, 'type'=>'CodeableConcept', 'path'=>'Medication.code', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/medication-codes'}},
  'status' => {'valid_codes'=>{'http://hl7.org/fhir/medication-status'=>['active', 'inactive', 'entered-in-error']}, 'type'=>'code', 'path'=>'Medication.status', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/medication-status'}},
  'isBrand' => {'type'=>'boolean', 'path'=>'Medication.isBrand', 'min'=>0, 'max'=>1},
  'isOverTheCounter' => {'type'=>'boolean', 'path'=>'Medication.isOverTheCounter', 'min'=>0, 'max'=>1},
  'manufacturer' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Medication.manufacturer', 'min'=>0, 'max'=>1},
  'form' => {'valid_codes'=>{'http://snomed.info/sct'=>['7946007', '11190007', '17519006', '30843009', '36875001', '37937005', '46992007', '48582000', '52262001', '63316001', '64241004', '66076007', '77899000', '85581007', '385018001', '385019009', '385020003', '385021004', '385022006', '385023001', '385024007', '385025008', '385026009', '385027000', '385028005', '385029002', '385032004', '385033009', '385034003', '385035002', '385036001', '385038000', '385039008', '385041009', '385042002', '385043007', '385044001', '385045000', '385046004', '385047008', '385048003', '385049006', '385050006', '385051005', '385052003', '385053008', '385054002', '385055001', '385057009', '385058004', '385059007', '385060002', '385061003', '385062005', '385063000', '385064006', '385069001', '385070000', '385071001', '385073003', '385074009', '385077002', '385078007', '385079004', '385080001', '385081002', '385082009', '385083004', '385084005', '385085006', '385086007', '385087003', '385088008', '385089000', '385090009', '385091008', '385092001', '385094000', '385095004', '385096003', '385098002', '385099005', '385100002', '385101003', '385102005', '385103000', '385104006', '385105007', '385106008', '385107004', '385108009', '385110006', '385111005', '385112003', '385113008', '385114002', '385115001', '385116000', '385117009', '385118004', '385119007', '385121002', '385122009', '385123004', '385124005', '385125006', '385128008', '385130005', '385132002', '385133007', '385134001', '385135000', '385136004', '385137008', '385138003', '385139006', '385140008', '385141007', '385142000', '385143005', '385147006', '385148001', '385149009', '385150009', '385151008', '385152001', '385153006', '385154000', '385155004', '385156003', '385157007', '385158002', '385159005', '385160000', '385162008', '385163003', '385164009', '385165005', '385166006', '385167002', '385168007', '385169004', '385170003', '385171004', '385172006', '385173001', '385174007', '385175008', '385176009', '385177000', '385178005', '385179002', '385180004', '385182007', '385183002', '385184008', '385185009', '385186005', '385187001', '385188006', '385189003', '385191006', '385192004', '385193009', '385194003', '385195002', '385196001', '385197005', '385198000', '385199008', '385200006', '385201005', '385202003', '385203008', '385204002', '385205001', '385206000', '385207009', '385208004', '385210002', '385211003', '385212005', '385213000', '385214006', '385215007', '385216008', '385217004', '385219001', '385220007', '385221006', '385222004', '385223009', '385224003', '385229008', '385230003', '385231004', '385236009', '385237000', '385242008', '385245005', '385246006', '385247002', '385248007', '385250004', '385251000', '385257001', '385258006', '385259003', '385260008', '385261007', '385262000', '385278003', '385279006', '385286003', '414951009', '420243009', '420253005', '420275007', '420283001', '420292003', '420293008', '420305009', '420317006', '420378007', '420385006', '420386007', '420407000', '420430006', '420450005', '420460001', '420509004', '420536002', '420540006', '420610000', '420627008', '420631002', '420634005', '420636007', '420641004', '420656008', '420692007', '420699003', '420705007', '420736004', '420757007', '420761001', '420767002', '420768007', '420802004', '420828001', '420847003', '420873008', '420887008', '420891003', '420901005', '420927005', '420929008', '420955009', '420956005', '420992009', '421026006', '421027002', '421034000', '421043009', '421051007', '421056002', '421079001', '421080003', '421104008', '421131006', '421155001', '421166008', '421195004', '421221008', '421271006', '421288004', '421300005', '421316007', '421338009', '421340004', '421343002', '421347001', '421366001', '421374000', '421378002', '421382000', '421410002', '421425002', '421427005', '421428000', '421446006', '421504000', '421522002', '421532009', '421535006', '421575003', '421606006', '421607002', '421618002', '421620004', '421628006', '421637006', '421669002', '421701006', '421713001', '421716009', '421720008', '421721007', '421752008', '421759004', '421765004', '421857007', '421873001', '421890007', '421932003', '421937009', '421943006', '421949005', '421987002', '421999009', '422054001', '422059006', '422060001', '422068008', '422080000', '422085005', '422151007', '422186009', '422197009', '422199007', '422201009', '422202002', '422259002', '422264003', '422301006', '422336005', '422353003', '424179000', '424552006', '425753008', '425965000', '426210003', '426684005', '426823003', '426969004', '427129005', '427564005', '427609008', '429885007', '443424002', '447050008', '447079001']}, 'type'=>'CodeableConcept', 'path'=>'Medication.form', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/medication-form-codes'}},
  'ingredient' => {'type'=>'Medication::Ingredient', 'path'=>'Medication.ingredient', 'min'=>0, 'max'=>Float::INFINITY},
  'package' => {'type'=>'Medication::Package', 'path'=>'Medication.package', 'min'=>0, 'max'=>1},
  'image' => {'type'=>'Attachment', 'path'=>'Medication.image', '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, #each_element, #equals?, #hash, #initialize, #method_missing, #mismatch, #primitive?, #to_reference, #valid?, #validate, #validate_profile

Constructor Details

This class inherits a constructor from FHIR::STU3::Model

Dynamic Method Handling

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

Instance Attribute Details

#codeObject

0-1 CodeableConcept



131
132
133
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 131

def code
  @code
end

#containedObject

0-* [ Resource ]



128
129
130
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 128

def contained
  @contained
end

#extensionObject

0-* [ Extension ]



129
130
131
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 129

def extension
  @extension
end

#formObject

0-1 CodeableConcept



136
137
138
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 136

def form
  @form
end

#idObject

0-1 id



123
124
125
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 123

def id
  @id
end

#imageObject

0-* [ Attachment ]



139
140
141
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 139

def image
  @image
end

#implicitRulesObject

0-1 uri



125
126
127
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 125

def implicitRules
  @implicitRules
end

#ingredientObject

0-* [ Medication::Ingredient ]



137
138
139
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 137

def ingredient
  @ingredient
end

#isBrandObject

0-1 boolean



133
134
135
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 133

def isBrand
  @isBrand
end

#isOverTheCounterObject

0-1 boolean



134
135
136
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 134

def isOverTheCounter
  @isOverTheCounter
end

#languageObject

0-1 code



126
127
128
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 126

def language
  @language
end

#manufacturerObject

0-1 Reference(Organization)



135
136
137
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 135

def manufacturer
  @manufacturer
end

#metaObject

0-1 Meta



124
125
126
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 124

def meta
  @meta
end

#modifierExtensionObject

0-* [ Extension ]



130
131
132
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 130

def modifierExtension
  @modifierExtension
end

#packageObject

0-1 Medication::Package



138
139
140
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 138

def package
  @package
end

#statusObject

0-1 code



132
133
134
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 132

def status
  @status
end

#textObject

0-1 Narrative



127
128
129
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 127

def text
  @text
end

Instance Method Details

#resourceTypeObject



141
142
143
# File 'lib/fhir_stu3_models/fhir/resources/Medication.rb', line 141

def resourceType
  'Medication'
end