source: WorldVistAEHR/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSSTXT.m@ 1087

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

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1PSSTXT ;BIR/WRT-Edit DRUG TEXT file routine ; 11/15/01 8:11
2 ;;1.0;PHARMACY DATA MANAGEMENT;**29,55**;9/30/97
3BEGIN S PSSNFI=1,PSSFG=0 W !,"This option enables you to edit entries in the DRUG TEXT file.",!! F PSSQQ=1:1 K DA D ASK Q:PSSFG
4DONE K DA,PSSFG,PSSQQ,PSSNFI,NAME,PSSENT,PSSBEG,PSSEND,PSSSRT,PSSXX
5 K %,D,D0,DI,DIE,DLAYGO,DQ,DR,X,Y
6 Q
7 ;
8ASK W ! S DIC="^PS(51.7,",DIC(0)="QEALMN",DLAYGO=51.7 D ^DIC K DIC I Y<0 S PSSFG=1 Q
9 S PSSENT=+Y D WRIT,REVW W ! S DA=PSSENT S DIE="^PS(51.7,"
10 D NAME I PSSFG Q
11 D TEXT I PSSFG Q
12 W !
13 S DR="1;2" D ^DIE,CHECKI
14 Q
15CHECK I '$O(^PS(51.7,DA,2,0)),'$D(^PS(50.7,"DTXT",DA)),'$D(^PSDRUG("DTXT",DA)) S DIK="^PS(51.7," D ^DIK K DIK
16 Q
17 ;
18WRIT W !!,"There may be entries in your DRUG file and PHARMACY ORDERABLE ITEM file linked",!,"to this Drug Text Name. Editing information related to this Drug Text entry",!
19 W "will affect the display of information related to these.",!
20 Q
21 ;
22REVW K DIR S DIR("A")="Do you want to review the list of drugs and orderable items linked to this Drug Text entry? ",DIR(0)="Y",DIR("B")="YES"
23 S DIR("?",1)="Answering 'Yes' will list all entries in the Drug file or Orderable Item file",DIR("?",2)="that are linked to this drug text entry. The list could be long, so a "
24 S DIR("?")="device can be entered to print a hard copy, if desired."
25 D ^DIR K DIR
26 I Y=1 D D RPT^PSSDTR
27 . S PSSSRT="S"
28 . S (PSSXX,PSSBEG,PSSEND)=$P($G(^PS(51.7,PSSENT,0)),"^",1)
29 Q
30 ;
31OUTMSG W !!,"IMPORTANT!! After editing the Drug Text Name OR Text, review the drugs and",!?12,"orderable items linked to this entry for accuracy."
32 Q
33 ;
34CHECKI I $P($G(^PS(51.7,DA,0)),"^",2) D MSG
35 Q
36 ;
37MSG W !!,"Because this entry was inactivated, drugs and orderable items that are linked",!,"to this entry will no longer display the text associated with this entry."
38 W !,"You should review all drugs and orderable items associated with this Drug Text",!,"entry and update appropriately.",!
39 Q
40 ;
41NAME ;
42 N PSSNAME
43 W ! K DIR S DIR(0)="Y",DIR("A")="Do you want to edit the Drug Text Name",DIR("B")="NO" D ^DIR K DIR
44 I X["^" S PSSFG=1 Q
45 D OUTMSG
46 I '$G(Y) Q
47 S PSSNAME=$P($G(^PS(51.7,DA,0)),"^",1)
48 W ! K DIR S DIR(0)="FO^1:75",DIR("A")="Drug Text Name: ",DIR("B")=PSSNAME D ^DIR K DIR
49 I $G(X)["^" S PSSFG=1 Q
50 I X'="",X'=PSSNAME D
51 . I X["@" W " **DELETIONS ARE NOT ALLOWED!" Q
52 . S ^PS(51.7,"B",X,DA)="" K ^PS(51.7,"B",PSSNAME,DA)
53 . S $P(^PS(51.7,DA,0),"^",1)=X
54 Q
55 ;
56TEXT ;
57 W ! K DIR S DIR(0)="Y",DIR("A")="Do you want to edit the text for this entry",DIR("B")="YES" D ^DIR K DIR
58 I $G(X)["^" S PSSFG=1 Q
59 I '+($G(Y)) Q
60 S DR="3" D ^DIE,CHECK
61 Q
62 ;
Note: See TracBrowser for help on using the repository browser.