[613] | 1 | QANCNV3 ;HISC/GJC,DAD-Conversion of data from V1.01 to V2.0 ;10/9/92
|
---|
| 2 | ;;2.0;Incident Reporting;**1**;08/07/1992
|
---|
| 3 | DESC ;Incident descriptive data.
|
---|
| 4 | S QANDSCPT=0 ;flag condition for descriptive data '1' for yes, '0' for no
|
---|
| 5 | I $D(^PRMQ(513.72,PRMQIEN,"PM",0)) S QANDSCPT=1 D DESC1
|
---|
| 6 | I $D(^PRMQ(513.72,PRMQIEN,"MS",0)) S QANDSCPT=1 D DESC2
|
---|
| 7 | I $D(^PRMQ(513.72,PRMQIEN,"AS",0)) S QANDSCPT=1 D DESC3
|
---|
| 8 | I $P(PRMQ0,U,14)]"" S QANDSCPT=1,^TMP($J,"QAN DESC DESCRIPTION",$P(PRMQ0,U,14))=""
|
---|
| 9 | I $P(PRMQ0,U,18)]"" S QANDSCPT=1,^TMP($J,"QAN DESC PROCEDURE",$P(PRMQ0,U,18))=""
|
---|
| 10 | Q
|
---|
| 11 | DESC1 ;Descriptive data part 1
|
---|
| 12 | F QAN=0:0 S QAN=$O(^PRMQ(513.72,PRMQIEN,"PM",QAN)) Q:QAN'>0 S QANDESC(0)=$P(^(QAN,0),U) D
|
---|
| 13 | . I QANDESC(0)]"" S Y=QANDESC(0),C=$P($G(^DD(513.7222,.01,0)),U,2) D Y^DIQ
|
---|
| 14 | . I QANDESC(0)]"",(Y]"") S ^TMP($J,"QAN DESC PROTECTIVE MEASURES",Y)=""
|
---|
| 15 | Q
|
---|
| 16 | DESC2 ;Descriptive data part 2
|
---|
| 17 | F QAN=0:0 S QAN=$O(^PRMQ(513.72,PRMQIEN,"MS",QAN)) Q:QAN'>0 S QANDESC(0)=$P(^(QAN,0),U) D
|
---|
| 18 | . I QANDESC(0)]"" S Y=QANDESC(0),C=$P($G(^DD(513.7223,.01,0)),U,2) D Y^DIQ
|
---|
| 19 | . I QANDESC(0)]"",(Y]"") S ^TMP($J,"QAN DESC PATIENT MENTAL STATUS",Y)=""
|
---|
| 20 | Q
|
---|
| 21 | DESC3 ;Descriptive data part 3
|
---|
| 22 | F QAN=0:0 S QAN=$O(^PRMQ(513.72,PRMQIEN,"AS",QAN)) Q:QAN'>0 S QANDESC(0)=$P(^(QAN,0),U) D
|
---|
| 23 | . I QANDESC(0)]"" S Y=QANDESC(0),C=$P($G(^DD(513.7224,.01,0)),U,2) D Y^DIQ
|
---|
| 24 | . I QANDESC(0)]"",(Y]"") S ^TMP($J,"QAN DESC PATIENT ACTIVITY STATUS",Y)=""
|
---|
| 25 | Q
|
---|