[613] | 1 | MCPOS0E ;HIRMFO/DAD-RESTORE LOCALLY DEFINED PROCEDURES TO THE MED VIEW FILE ;8/21/96 11:57
|
---|
| 2 | ;;2.3;Medicine;;09/13/1996
|
---|
| 3 | ;
|
---|
| 4 | N D0,DA,DD,DIC,DINUM,DLAYGO,DO,MCD0,MCDATA,MCGENRIC,MCOUNT
|
---|
| 5 | N MCPROCSP,MCTYPE
|
---|
| 6 | S MCDATA(1)=""
|
---|
| 7 | S MCDATA(2)="Restoring locally defined procedures to the"
|
---|
| 8 | S MCDATA(3)="Medicine View file (#690.2)"
|
---|
| 9 | ;
|
---|
| 10 | S MCPROCSP=$$GET1^DID(690.2,4,"","SPECIFIER"),MCOUNT=4
|
---|
| 11 | F MCGENRIC=1,2 D
|
---|
| 12 | . S MCTYPE=$P("Full^Brief",U,MCGENRIC)_" Generic"
|
---|
| 13 | . S MCGENRIC(MCGENRIC)=+$O(^MCAR(690.2,"B",MCTYPE,0))
|
---|
| 14 | . I MCGENRIC(MCGENRIC)'>0 D
|
---|
| 15 | .. S MCDATA(MCOUNT)=" '"_MCTYPE_"' not found in the Medicine View file"
|
---|
| 16 | .. S MCOUNT=MCOUNT+1
|
---|
| 17 | .. Q
|
---|
| 18 | . Q
|
---|
| 19 | D MES^XPDUTL(.MCDATA)
|
---|
| 20 | ;
|
---|
| 21 | S MCD0=0
|
---|
| 22 | F S MCD0=$O(^MCAR(697.2,MCD0)) Q:MCD0'>0 D
|
---|
| 23 | . I $P($G(^MCAR(697.2,MCD0,0)),U,19)'>0 Q
|
---|
| 24 | . F MCGENRIC=1,2 I MCGENRIC(MCGENRIC) D
|
---|
| 25 | .. I $O(^MCAR(690.2,MCGENRIC(MCGENRIC),3,"B",MCD0,0)) Q
|
---|
| 26 | .. K DD,DIC,DINUM,DO
|
---|
| 27 | .. S X=MCD0,DIC="^MCAR(690.2,"_MCGENRIC(MCGENRIC)_",3,",DIC(0)="L"
|
---|
| 28 | .. S DIC("P")=MCPROCSP,DLAYGO=690.2,(D0,DA(1))=MCGENRIC(MCGENRIC)
|
---|
| 29 | .. D FILE^DICN
|
---|
| 30 | .. Q
|
---|
| 31 | . Q
|
---|
| 32 | Q
|
---|