source: WorldVistAEHR/trunk/r/INCIDENT_REPORTING-QAN/QANCNVIN.m@ 949

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1QANCNVIN ;HISC/GJC-Incident Reporting Convert Incident Names ;2/16/93
2VERSION ;;2.0;Incident Reporting;**18**;08/07/1992
3 ;
4 K DIR S DIR(0)="Y",DIR("B")="Yes"
5 S DIR("A",1)="Do you wish to change incident name text which contains"
6 S DIR("A")="a comma to a dash" D ^DIR K DIR
7 I '+Y D KILL W !,$C(7),"Exiting..." Q
8TEST ;Convert ", " to "-"
9 W !?5,"CONVERTING OLD INCIDENT TEXT FROM QA(742.1) TO THE"
10 W !?5,"NEW INCIDENT TEXT FOR VERSION 3.0 OF INCIDENT REPORTING.",!
11 D WAIT^DICD W ! K ^TMP($J) S QANSUB=""
12 F S QANSUB=$O(^QA(742.1,"B",QANSUB)) Q:QANSUB="" D
13 . S QANIEN=+$O(^QA(742.1,"B",QANSUB,0)) Q:QANIEN'>0
14 . S QANOTXT=$P($G(^QA(742.1,QANIEN,0)),U)
15 . I QANOTXT["," D
16 .. S QANNTXT=$$CONVERT^QANCNVIN(QANOTXT)
17 .. S DIE="^QA(742.1,",DA=QANIEN,DR=".01///"_QANNTXT
18 .. W !?5,"Converting old incident text: "_QANOTXT
19 .. W !?5,"To new incident text: "_QANNTXT,!
20 .. S QANFLAG=1 D ^DIE K DA,DIE,DR
21 W !?5,$S(+$G(QANFLAG):"Conversion complete!",1:"Records need not be converted.")
22 W !!,$C(7) K DIR S DIR(0)="Y",DIR("B")="Yes"
23 S DIR("A")="Do you wish to delete this routine from the system"
24 D ^DIR K DIR
25 I +Y S X="QANCNVIN" X ^%ZOSF("DEL")
26KILL ;Kill and quit
27 K %,%Y,DA,DR,QANFLAG,QANIEN,QANNTXT,QANOTXT
28 K QANSUB,X,X1,Y
29 Q
30CONVERT(X) ;Convert ', ' to '-'
31 K X1
32 F S X1=$F(X,", ") Q:'X1 S X=$E(X,0,X1-3)_"-"_$E(X,X1,255)
33 Q X
Note: See TracBrowser for help on using the repository browser.