source: WorldVistAEHR/trunk/r/MENTAL_HEALTH-YS-RUCL-YI-YT/YSESA.m@ 975

Last change on this file since 975 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1YSESA ;SLC/DCM-ROUTINE TO RUN A DECISION SYSTEM/ALGORITHM DIRECTLY ; 7/7/89 10:50 ;
2 ;;5.01;MENTAL HEALTH;;Dec 30, 1994
3 ;RAN DIRECTLY AS AN APPLICATION - BYPASSING THE MAIN MENU DRIVER
4 ;DECISION EXPERT SYSTEM (VERSION 1.0) FOR THE MENTAL HEALTH PACKAGE - DWIGHT MCDANIEL / REGION 5 ISC, SLC
5 ;THIS ROUTINE WILL GIVE DIRECT ENTRY INTO AN EXPERT SYSTEM OR AN ALGORITHM
6 ;TO ENTER AN EXPERT SYSTEM SYSTEM, SET THE VARIABLE A5ASYS=TO THE SYSTEM YOU WANT TO RUN.
7 ;TO ENTER DIRECTLY INTO AN ALGORITHM, SET A5ASYS=SYSTEM TO RUN AND ATALG=TO THE ALGORITHM
8SYS I '$D(A5ASYS) Q
9 D SETSYS S GN=$O(@(ESDBP1_Q_A5ASYS_Q_",0)")) D ^YSESD
10 G END
11ALG I '$D(A5ASYS)!('$D(A5ALG)) Q
12 D SETSYS S A5AFL=1
13 S GN=$O(@(ESDBP1_Q_A5ASYS_Q_",0)")),ESDBP=ESDBP_GN_",1,",ESDBP1=ESDBP_"""B"",",GN1=$O(@(ESDBP1_Q_A5ALG_Q_",0)"))
14 S A5AND=@(ESDBP_GN1_",1)"),ESDBP=ESDBP_GN1_",2,",ESDBP1=ESDBP_"""B"",",GN2=$O(@(ESDBP1_Q_A5AND_Q_",0)"))
15 S XCODE="F EXI=1:1 W $S($P(ANS,"","",EXI)]""0"":$P(ANS,"","",EXI),1:"""") Q:$P(ANS,"","",EXI+1)="""" W $S($P(ANS,"","",EXI)'=0:""/"",1:"""")"
16 S A5AS(0)=ESDBP,A5AS(1)=ESDBP D LOOP^YSESD G END
17SETSYS S Q="""",A5ASP=0,ST=0,STR="",$P(STR,"*",79)="" I '$D(IOF) D HOME^%ZIS
18 S ESDBP="^YS(628,",ESDBP1=ESDBP_"""B"",",DIC=ESDBP
19 Q
20END W @IOF
21 K C,A5AI,A5AJ,ESI,ESJ,A5AX,Y,P,GN,GN1,GN2,DIC,A5ASYS,A5ALG,ESDBP,ESDBP1,XCODE,EXI,ANS,ST,STR,PROMPT,A5ARES,S,A5AND,T,TB,TC,X,A5AFL
22 Q
Note: See TracBrowser for help on using the repository browser.