source: WorldVistAEHR/trunk/r/MEDICINE-MC/MCU.m@ 702

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

initial load of WorldVistAEHR

File size: 884 bytes
Line 
1MCU ;WISC/MLH-GENERAL UTILITY FOR MEDICINE ;6/21/96 13:31
2 ;;2.3;Medicine;;09/13/1996
3GETVALUE(MCFILENO,DA,DR) ; get external value of single field number DR in record number DA of file number MCFILENO
4 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)
5 Q MCRESULT
6INSERT(STRING,POST,CHAR) ; Insert a character in a string
7 ; Mumps statement S $E(MHY,MHFL)=$C(MCHAR)
8 N CHR,LEFT,RIGHT,LEN
9 S LEN=$L(STRING)
10 S CHR=$C(CHAR)
11 S LEFT=$E(STRING,1,(POST-1))
12 S RIGHT=$E(STRING,(POST+1),LEN)
13 Q LEFT_CHR_RIGHT
14PARAM(DR) ; Edit the Medicine Package Parameters file (#690.1)
15 I $G(DR)="" Q
16 N DA,DD,DIC,DIE,DINUM,DLAYGO,DO
17 S DA=+$O(^MCAR(690.1,0))
18 I DA'=1 D
19 . K DD,DIC,DINUM,DO
20 . S DIC="^MCAR(690.1,",DIC(0)="L",DLAYGO=690.1,(DINUM,X)=1
21 . D FILE^DICN S DA=+Y
22 . Q
23 I DA=1 S DIE="^MCAR(690.1," D ^DIE
24 Q
Note: See TracBrowser for help on using the repository browser.