source: FOIAVistA/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMEXU0.m@ 1683

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1PXRMEXU0 ; SLC/PKR - Reminder exchange general utilities, #0.;06/23/2005
2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
3 ;=========================================================
4LOC(FDA) ;Process the FDA for location lists.
5 ;Direct reads of ^DIC(40.7) covered by DBIA #537.
6 N AMIS,IEN,IENS,STOP,TEMP,TEXT
7 ;Stop Codes may not have a unique name, use the AMIS Reporting Stop
8 ;code to determine which one to use.
9 S IENS=""
10 F S IENS=$O(FDA(810.9001,IENS)) Q:IENS="" D
11 . S STOP=FDA(810.9001,IENS,.01)
12 . S AMIS=FDA(810.9001,IENS,.02)
13 . S IEN=$O(^DIC(40.7,"C",AMIS,""))
14 . S TEMP=$P(^DIC(40.7,IEN,0),U,1)
15 . I TEMP'=STOP D Q
16 .. S TEXT(1)="Name associated with AMIS stop code does not match the one in the"
17 .. S TEXT(2)="packed reminder:"
18 .. S TEXT(3)=" AMIS="_AMIS
19 .. S TEXT(4)=" Site Name="_TEMP
20 .. S TEXT(5)=" Name in packed reminder="_STOP
21 .. D EN^DDIOL(.TEXT)
22 . S FDA(810.9001,IENS,.01)="`"_IEN
23 Q
24 ;
25 ;=========================================================
26GETIEN(NFOUND,LIST) ;FIND^DIC has found multiple entries with the same name.
27 ;NFOUND is the number found, LIST is the array returned by FIND^DIC.
28 ;Ask the user which one they want to use.
29 N DIR,FN,IND,NC,X,Y
30 S DIR(0)="S^"
31 F IND=1:1:NFOUND D
32 . S DIR(0)=DIR(0)_IND_":"_LIST("DILIST",2,IND)_";"
33 S DIR("L",1)="Select one of the following to use:"
34 S NC=1
35 F IND=1:1:NFOUND D
36 . S NC=NC+1
37 . S DIR("L",NC)=IND_"- "_LIST("DILIST",1,IND)_" IEN="_LIST("DILIST",2,IND)
38 . S FN=$O(LIST("DILIST","ID",IND,""))
39 . I FN="" Q
40 . S NC=NC+1
41 . S DIR("L",NC)=" "_LIST("DILIST","ID",IND,FN)
42 . F S FN=$O(LIST("DILIST","ID",IND,FN)) Q:FN="" D
43 .. I $L(LIST("DILIST","ID",IND,FN))=0 Q
44 .. S NC=NC+1
45 .. S DIR("L",NC)=" "_LIST("DILIST","ID",IND,FN)
46 ;Truncate DIR("L") as required.
47 S DIR("L")=DIR("L",NC) K DIR("L",NC)
48 D ^DIR
49 I Y="^" D
50 . N TEXT
51 . S TEXT(1)="Entering ""^"" tells Reminder Exchange the entry does not exist. You will be"
52 . S TEXT(2)="ask for a replacement."
53 . D EN^DDIOL(.TEXT)
54 Q $S($D(Y(0)):Y(0),1:0)
55 ;
56 ;=========================================================
57SFNFTC(IEN) ;Set the found/not found text line counts in the reminder
58 ;definition.
59 D SNMLA^PXRMFNFT(IEN)
60 D SNMLF^PXRMFNFT(IEN,20)
61 D SNMLF^PXRMFNFT(IEN,25)
62 D SNMLL^PXRMFNFT(IEN)
63 Q
64 ;
Note: See TracBrowser for help on using the repository browser.