source: WorldVistAEHR/trunk/r/HEALTH_SUMMARY-GMTS/GMTSRM1A.m@ 1150

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1GMTSRM1A ;SLC/JER,SBW - Create/Modify Health Summary (cont) ; 08/27/2002
2 ;;2.7;Health Summary;**56**;Oct 20, 1995
3 ;
4 ; External References
5 ; DBIA 10026 ^DIR
6 ; DBIA 10018 ^DIE
7 ;
8CHKSO ; Checks for existence of Summary Order (SO).
9 ;
10 ; Allows for overwrite or insertion prior
11 ; to existing "structure" records
12 ;
13 N SO,SOACTION,DIR
14 S SO=+Y,CMP(0)=$G(CMP(0))
15 I $D(OLDSO),OLDSO=SO S CMP(.01)=SO Q
16 I $D(OLDSO),OLDSO'=SO S SOACTION="E" D DELCMP^GMTSRM4
17 I '$D(^GMT(142,GMTSIFN,1,SO,0)) S CMP(.01)=+SO,GMTSNEW=1 Q
18 W !,$P(^GMT(142.1,$P(^GMT(142,GMTSIFN,1,SO,0),U,2),0),U)," Already exists at SUMMARY ORDER ",SO
19 S DIR(0)="SO^O:Overwrite;I:Insert Before;A:Append After",DIR("A")="Select Action" D ^DIR K DIR I $D(DIRUT) S GMTSQIT=1 Q
20 I Y="O" S SOACTION="O",OLDSO=SO D DELCMP^GMTSRM4 S GMTSNEW=1,CMP(.01)=SO Q
21 I Y="I" D INSRT^GMTSRM4 Q
22 I Y="A" D APPND^GMTSRM4
23 Q
24LOADSEL ; Load Selection Item Multiple
25 N DA,DC,DIC,DIE,DIEL,DK,DL,DM,DP,DR
26 S:'$D(^GMT(142,GMTSIFN,1,CMP(.01),1,0)) ^(0)="^142.14V^^"
27 S (DIC,DIE)="^GMT(142,"_GMTSIFN_",1,"_CMP(.01)_",1,",DA(2)=GMTSIFN,DA(1)=CMP(.01),DA=IEN S DR=".01////"_"^S X=CMP(142.14,IEN)" D ^DIE
28 Q
29 ;
30GETSEL(CMP) ; Get Default Selection Items
31 ;
32 ; Taken from Ad Hoc for Local Components
33 N GMI,GMJ,GMK
34 S GMI=$O(^GMT(142,"B","GMTS HS ADHOC OPTION",0)) Q:+GMI'>0
35 S GMJ=$O(^GMT(142,+GMI,1,"C",+CMP,0)) Q:+GMJ'>0
36 S GMK=0 F S GMK=$O(^GMT(142,+GMI,1,+GMJ,1,GMK)) Q:+GMK'>0 D
37 . S CMP(142.14,GMK)=$G(^GMT(142,+GMI,1,+GMJ,1,+GMK,0))
38 Q
Note: See TracBrowser for help on using the repository browser.