AUTNPOV ;IHS/LB - PROVIDER NARRATIVE TRUE INPUT TRANSFORM ;6/20/96
;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
;;92.1;IHS STANDARD DICTIONARIES;;NOV 13, 1991
;
START ;
Q:'$D(APCDOVRR)
I X="=",$D(APCDTNQP) S X=APCDTNQP
Q:X?.E1C.E
I $L(X)>30,$D(^AUTNPOV("B",X)) S X="`"_$O(^(X,0)) Q
S AUTNPOVX=$E(X,1,30)
F AUTNPOVY=0:0 S AUTNPOVY=$O(^AUTNPOV("B",AUTNPOVX,AUTNPOVY)) Q:'AUTNPOVY Q:$P(^AUTNPOV(AUTNPOVY,0),U,1)=X
S X=$S(AUTNPOVY:"`"_AUTNPOVY,$E(X)="`":X,$E(X)="""":X,1:""""_X_"""")
K AUTNPOVX,AUTNPOVY
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HAUTNPOV 531 printed Nov 22, 2024@17:35:31 Page 2
AUTNPOV ;IHS/LB - PROVIDER NARRATIVE TRUE INPUT TRANSFORM ;6/20/96
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
+2 ;;92.1;IHS STANDARD DICTIONARIES;;NOV 13, 1991
+3 ;
START ;
+1 if '$DATA(APCDOVRR)
QUIT
+2 IF X="="
IF $DATA(APCDTNQP)
SET X=APCDTNQP
+3 if X?.E1C.E
QUIT
+4 IF $LENGTH(X)>30
IF $DATA(^AUTNPOV("B",X))
SET X="`"_$ORDER(^(X,0))
QUIT
+5 SET AUTNPOVX=$EXTRACT(X,1,30)
+6 FOR AUTNPOVY=0:0
SET AUTNPOVY=$ORDER(^AUTNPOV("B",AUTNPOVX,AUTNPOVY))
if 'AUTNPOVY
QUIT
if $PIECE(^AUTNPOV(AUTNPOVY,0),U,1)=X
QUIT
+7 SET X=$SELECT(AUTNPOVY:"`"_AUTNPOVY,$EXTRACT(X)="`":X,$EXTRACT(X)="""":X,1:""""_X_"""")
+8 KILL AUTNPOVX,AUTNPOVY
+9 QUIT