% --------------------------------------------------------------------------
%   FILE:       DESCRIPT.PL
%   AUTHOR:     Tim Duncan
%   UPDATED:    Fri Aug  7 16:59:12 BST 1987
%   PURPOSE:    Prose descriptions of techniques and medical conditions.
% --------------------------------------------------------------------------


:- op(100,fx,*).
:- op(100,xfy,:).



/* Intended point of entry. If there is a list of things to describe the
descriptions are joined with comma "and". The first argument is a key, since
there may be cases where the same item should be described differently for
different purposes (eg: increased_icp). If there is no description stored
the item itself is returned.
*/


describe(_,[],[]) :- !.
describe(K,[Item|Others],Return) :-
    description(K,Item,Desc),
    describe(K,Others,More),
    ( null(More), Return = Desc
    ; Return = [Desc,*comma,and|More] ).
describe(K,Item,Desc) :-
    description(K,Item,Desc), !.




/* MENU_ITEMS as for techniques, except for non-use of technique */


description(menu_item,X,[none]) :-
    member(X,[tnopremeds,tnoirelaxant,tnon2o,tnomrelaxant,tnoanti,
            tnosed,tnonarcotic,tnosed1]).


/* TECHNIQUES
NB action routine names must be used because duplicates exist (eg: none)
*/

description(_,tga,[general,anaesthetic]).
description(_,treg,[regional,anaesthetic]).
description(_,tmaskcricoid,[intubation,after,mask,induction,with,
        cricoid,pressure]).
description(_,trapidseq,[rapid,sequence,intubation]).
description(_,tnormint,[conventional,intubation]). % conventional
description(_,tawake,[awake,intubation]).
description(_,toral,[oral,intubation]). % awake_oral
description(_,tnasal,[nasal,intubation]). % awake_nasal
description(_,tinhal,[an,inhalational,technique]).
description(_,tinhalin,[a,gentle,inhalational,induction]) :-
    recorded(patient,cad,_), !.
description(_,tinhalin,[an,inhalational,induction]).
description(_,tsux,[succinylcholine]).
description(_,thighpav,[high,dose,pancuronium]).
description(_,trelint,[relaxant]).
description(_,ttpl,[induction,using,thiopental]).
description(_,tketamine,[induction,with,ketamine]).
description(_,tn2o,[nitrous,oxide]).
description(_,tbalanced,[balanced,anesthesia]).
description(_,thalo,[halothane]).
description(_,teth,[enflurane]).
description(_,tnoirelaxant,[using,no,relaxant,for,intubation]).
description(_,tnomrelaxant,[using,no,relaxant,for,maintenance]).
description(_,tnointub,[not,intubating,the,patient]).
description(_,tnon2o,[using,no,nitrous,oxide]).
description(_,tdtc,[curare]).
description(_,tgall,[flaxedil]).
description(_,tmet,[metubine]).
description(_,tpav,[pancuronium]).
description(_,tmorph,[morphine]).
description(_,tmorphpm,[morphine,premedication]).
description(_,tdem,[meperidine]).
description(_,tfent,[fentanyl]).
description(_,tbarb,[barbituate]).
description(_,tval,[valium]).
description(_,tdrop,[droperidol]).
description(_,tvist,[vistaril]).
description(_,tphen,[phenergan]).
description(_,tatr,[atropine]).
description(_,trob,[glycopyrrolate]).
description(_,tpento,[pentobarbital]).
description(_,tsec,[seconal]).
description(_,tconduct,[conduction,anesthesia]).
description(_,tepid,[epidural,anesthesia]).
description(_,tspinal,[spinal,anesthesia]).
description(_,tnb,[regional,nerve,block]).
description(_,tnes,[nesacaine]).
description(_,tmarc,[marcaine]).
description(_,tlido,[lidocaine]).
description(_,ttet,[tetracaine]).
description(_,tsplido,[lidocaine]).
description(_,tanti,[anticholinergic,premedication]).
description(_,tnoanti,[using,no,anticholinergic,premedication]).
description(_,tnopremeds,[no,premedication]).
description(_,tprem,[premedication]).
description(_,tsed,[preoperative,sedation]).
description(_,tnosed,[using,no,preoperative,sedation]).
description(_,tpmnarc,[narcotic,premedication]).
description(_,tintub,[intubation]).
description(_,trelaxant,[using,a,relaxant,for,maintenance]).
description(_,tnonarcotic,[using,no,narcotic,premedication]).
description(_,tnosed1,[using,no,non,narcotic,premedication]).

/* DANGERS */

description(_,hepatic_damage,[hepatic,damage]).
description(_,renal_damage,[renal,toxicity]).
description(_,compromised_excretion,[compromised,renal,excretion,of,drugs]).
description(_,hypertension,[extremes,of,hypertension]).
description(_,eye_morbidity,[eye,morbidity]).
description(_,ruptured_aaa,[aneurysmal,rupture]).
description(_,tachycardia,[exacerbation,of,the,tachycardia]).
description(danger,increased_icp,[further,increase,of,*allcaps,icp]).
description(_,aw_loss,[loss,of,an,adequate,airway]).
description(_,neck_damage,[further,neck,damage]).
description(_,ruptured_aneurysm,[aneurysmal,rupture]).
description(_,cerebral_hypoperfusion,[cerebral,hypoperfusion]).
description(_,aw_bleeding,[excessive,airway,bleeding]).
description(_,muscle_compromise,[muscle,strength,compromise]).
description(_,ex_hyperkalemia,[exacerbation,of,the,hyperkalemia]).
description(_,bowel_gas,[excessive,expansion,of,bowel,gas,cavities]).
description(_,hypertensive_crises,[hypertensive,crises]).
description(_,fetal_damage,[fetal,damage,and,hypoxia]).


/* PROBLEMS */

description(_,liver_disease,[liver,disease]).
description(_,crf,[chronic,renal,failure]).
description(_,hbp,[high,blood,pressure]).
description(_,cva,[a,prior,stroke]).
description(_,cad,[coronary,artery,disease]).
description(_,full_stom,[a,full,stomach]).
description(_,pene_eye,[a,penetrating,eye,wound]).
description(_,aaa,[an,abdominal,aortic,aneurysm]).
description(_,abdop,[an,abdominal,operation]).
description(_,difficult_aw,[a,difficult,airway]).
description(_,facial_trauma,[facial,trauma]).
description(_,unstable_neck,[an,unstable,neck]).
description(_,aw_bleed,[upper,airway,bleeding]).
description(_,esoph_bleed,[an,esophageal,hemorrhage]).
description(problem,increased_icp,[increased,*allcaps,icp]).
description(_,cerebral_aneur,[a,cerebral,aneurysm]).
description(_,carotid_dis,[carotid,disease]).
description(_,hx_pat,[a,history,of,*allcaps,pat]).
description(_,bowel_obstr,[a,bowel,obstruction]).
description(_,maoi,[a,history,of,*allcaps,maoi,treatment]).
description(_,aortic_aneurysmectomy,[an,aortic,aneurysmectomy]).
description(_,headop,[an,operation,on,the,head,or,neck]).
description(_,cea,[a,carotid,endarterectomy]).
description(_,thr,[a,total,hip,repair]).
description(_,leop,[a,lower,extremity,operation]).
description(_,ueop,[an,upper,extremity,operation]).
description(_,morbid_obesity,[morbid,obesity]).



/* QUESTION - used as a header when menus are generated */


description(question,anes,[*cap,anaesthetic]).
description(question,an1,[*cap,premedication]).
description(question,intubation,[*cap,intubation,technique]).
description(question,rapidseq,[*cap,rapid,sequence,intubation]).
description(question,conventional,[*cap,conventional,intubation]).
description(question,m1,[*cap,maintenance,-,relaxant]).
description(question,relaxant,[*cap,relaxant,agent]).
description(question,m2,[*cap,maintenance,-,inhalation]).
description(question,inhal,[*cap,inhalation,agent]).
description(question,premed,['Pre-medication']).
description(question,pm1,['Pre-medication - sedative']).
description(question,sedative,[*cap,sedative,type]).
description(question,sed2,['Non-narcotic',sedative]).
description(question,nb,[*cap,regional,nerve,block]).
description(question,antichol,[*cap,anticholinergic,premedication]).

description(question,X,[*cap,X]).   % default question




description(_,X,[X]).     % default description
