MCU ;WISC/MLH-GENERAL UTILITY FOR MEDICINE ;6/21/96 13:31
;;2.3;Medicine;;09/13/1996
GETVALUE(MCFILENO,DA,DR) ; get external value of single field number DR in record number DA of file number MCFILENO
N MCRESULT K ^UTILITY("DIQ1",$J) S DIC=MCFILENO D EN^DIQ1 S MCRESULT=$G(^UTILITY("DIQ1",$J,MCFILENO,DA,DR)) K ^UTILITY("DIQ1",$J)
Q MCRESULT
INSERT(STRING,POST,CHAR) ; Insert a character in a string
; Mumps statement S $E(MHY,MHFL)=$C(MCHAR)
N CHR,LEFT,RIGHT,LEN
S LEN=$L(STRING)
S CHR=$C(CHAR)
S LEFT=$E(STRING,1,(POST-1))
S RIGHT=$E(STRING,(POST+1),LEN)
Q LEFT_CHR_RIGHT
PARAM(DR) ; Edit the Medicine Package Parameters file (#690.1)
I $G(DR)="" Q
N DA,DD,DIC,DIE,DINUM,DLAYGO,DO
S DA=+$O(^MCAR(690.1,0))
I DA'=1 D
. K DD,DIC,DINUM,DO
. S DIC="^MCAR(690.1,",DIC(0)="L",DLAYGO=690.1,(DINUM,X)=1
. D FILE^DICN S DA=+Y
. Q
I DA=1 S DIE="^MCAR(690.1," D ^DIE
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMCU 908 printed Oct 16, 2024@18:17:32 Page 2
MCU ;WISC/MLH-GENERAL UTILITY FOR MEDICINE ;6/21/96 13:31
+1 ;;2.3;Medicine;;09/13/1996
GETVALUE(MCFILENO,DA,DR) ; get external value of single field number DR in record number DA of file number MCFILENO
+1 NEW MCRESULT
KILL ^UTILITY("DIQ1",$JOB)
SET DIC=MCFILENO
DO EN^DIQ1
SET MCRESULT=$GET(^UTILITY("DIQ1",$JOB,MCFILENO,DA,DR))
KILL ^UTILITY("DIQ1",$JOB)
+2 QUIT MCRESULT
INSERT(STRING,POST,CHAR) ; Insert a character in a string
+1 ; Mumps statement S $E(MHY,MHFL)=$C(MCHAR)
+2 NEW CHR,LEFT,RIGHT,LEN
+3 SET LEN=$LENGTH(STRING)
+4 SET CHR=$CHAR(CHAR)
+5 SET LEFT=$EXTRACT(STRING,1,(POST-1))
+6 SET RIGHT=$EXTRACT(STRING,(POST+1),LEN)
+7 QUIT LEFT_CHR_RIGHT
PARAM(DR) ; Edit the Medicine Package Parameters file (#690.1)
+1 IF $GET(DR)=""
QUIT
+2 NEW DA,DD,DIC,DIE,DINUM,DLAYGO,DO
+3 SET DA=+$ORDER(^MCAR(690.1,0))
+4 IF DA'=1
Begin DoDot:1
+5 KILL DD,DIC,DINUM,DO
+6 SET DIC="^MCAR(690.1,"
SET DIC(0)="L"
SET DLAYGO=690.1
SET (DINUM,X)=1
+7 DO FILE^DICN
SET DA=+Y
+8 QUIT
End DoDot:1
+9 IF DA=1
SET DIE="^MCAR(690.1,"
DO ^DIE
+10 QUIT