Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ORWDRA

ORWDRA.m

Go to the documentation of this file.
  1. ORWDRA ; SLC/KCM - Radiology calls to support windows [ 08/03/96 6:42 PM ]
  1. ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
  1. ;
  1. DEF(LST,PATID) ; Get dialog data for radiology
  1. N ILST,I,X S ILST=0
  1. S LST($$NXT)="~Common Procedures" D COMMPRO
  1. S LST($$NXT)="~Modifiers" D MODIFYR
  1. S LST($$NXT)="~Urgencies" D URGENCY
  1. S LST($$NXT)="~Transport" D TRNSPRT
  1. S LST($$NXT)="~Category" D CATEGRY
  1. S LST($$NXT)="~Submit to" D SUBMIT
  1. S LST($$NXT)="~Ask Submit="_$$GET^XPAR("ALL","RA SUBMIT PROMPT",1,"Q")
  1. S LST($$NXT)="~Last 7 Days" D LAST7
  1. Q
  1. MODIFYR ; Get the modifiers (should be by imaging type)
  1. S I=0 F S I=$O(^RAMIS(71.2,I)) Q:'I S LST($$NXT)="i"_I_U_$P(^(I,0),U)
  1. Q
  1. COMMPRO ; Get the common procedures
  1. S X="" F S X=$O(^ORD(101.43,"COMMON","RAD",X)) Q:X="" D
  1. . S I=$O(^ORD(101.43,"COMMON","RAD",X,0)),LST($$NXT)="i"_I_U_X
  1. Q
  1. URGENCY ; Get the allowable urgencies and default
  1. F X="STAT","ASAP","ROUTINE","DONE" D
  1. . S I=$O(^ORD(101.42,"B",X,0)),LST($$NXT)="i"_I_U_X
  1. S LST($$NXT)="dROUTINE"
  1. Q
  1. TRNSPRT ; Get the modes of transport
  1. F X="A^AMBULATORY","P^PORTABLE","S^STRETCHER","W^WHEELCHAIR" D
  1. . S LST($$NXT)="i"_X
  1. ; figure default on windows side
  1. Q
  1. CATEGRY ; Get the categories of exam
  1. F X="I^INPATIENT","O^OUTPATIENT","C^CONTRACT","S^SHARING","E^EMPLOYEE","R^RESEARCH" D
  1. . S LST($$NXT)="i"_X
  1. ; figure default on windows side
  1. Q
  1. SUBMIT ; Get the locations to which the request may be submitted
  1. N TMPLST
  1. D EN4^RAO7PC1("RAD","TMPLST")
  1. S I=0 F S I=$O(TMPLST(I)) Q:'I S LST($$NXT)="i"_TMPLST(I)
  1. S I=$O(TMPLST(0)),X=$P(TMPLST(I),U,2),LST($$NXT)="d"_X
  1. Q
  1. LAST7 ; Get exams for the last 7 days
  1. K ^TMP($J,"RAE7") D EN2^RAO7PC1(PATID)
  1. S I=0 F S I=$O(^TMP($J,"RAE7",PATID,I)) Q:'I D
  1. . S LST($$NXT)="i"_I_U_^(I)
  1. K ^TMP($J,"RAE7")
  1. Q
  1. NXT() ; Increment index of LST
  1. S ILST=ILST+1
  1. Q ILST