Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APCHS61

APCHS61.m

Go to the documentation of this file.
  1. APCHS61 ; IHS/CMI/LAB - PART 6 OF APCHS -- SUMMARY PRODUCTION COMPONENTS 18 Jun 2008 10:07 AM ;
  1. ;;2.0;IHS PCC SUITE;**7,10,11**;MAY 14, 2009;Build 58
  1. ;
  1. ;
  1. FMH ;EP - ******* FAMILY HISTORY * 9000014 *******
  1. ; <SETUP>
  1. I '$D(^AUPNFH("AC",APCHSPAT)),'$D(^AUPNFHR("AA",APCHSPAT)) Q ;no family history to display
  1. X APCHSCKP Q:$D(APCHSQIT) X:'APCHSNPG APCHSBRK
  1. ; <DISPLAY>
  1. K APCHTFH
  1. S APCHSDFN=0 F S APCHSDFN=$O(^AUPNFH("AC",APCHSPAT,APCHSDFN)) Q:'APCHSDFN D
  1. .Q:'$D(^AUPNFH(APCHSDFN,0)) ;bad xref
  1. .S R=$P(^AUPNFH(APCHSDFN,0),U,9)
  1. .I R="" S R="Z",S=$$VAL^XBDIQ1(9000014,APCHSDFN,.07),Z=S_" ",O=8 D G FMH1
  1. ..I S="" S S="UNKNOWN",Z="UNKNOWN "
  1. .S S=$$VAL^XBDIQ1(9000014.1,R,.01),Z=S_" "_$P(^AUPNFHR(R,0),U,3)
  1. .S O=$P(^AUPNFHR(R,0),U) I O S O=$P($G(^AUTTRLSH(O,21)),U,3)
  1. .I 'O S O=8
  1. FMH1 .S APCHTFH(O,S,Z,R,(9999999-$$LDM(APCHSDFN)),APCHSDFN)=""
  1. ;get relations with no conditions
  1. S X=0 F S X=$O(^AUPNFHR("AA",APCHSPAT,X)) Q:X'=+X S Y=0 F S Y=$O(^AUPNFHR("AA",APCHSPAT,X,Y)) Q:Y'=+Y D
  1. .I '$D(^AUPNFH("AE",Y)) D
  1. ..S R=Y
  1. ..S S=$$VAL^XBDIQ1(9000014.1,R,.01),Z=S_" "_$P(^AUPNFHR(R,0),U,3)
  1. ..S O=$P(^AUPNFHR(R,0),U) I O S O=$P($G(^AUTTRLSH(O,21)),U,3)
  1. ..I 'O S O=8
  1. ..S APCHTFH(O,S,Z,R,(9999999-$P(^AUPNFHR(R,0),U,9)),0)=""
  1. W "Date Last Mod",?14,"Relation/Status/Diagnosis"
  1. S APCHO=0 F S APCHO=$O(APCHTFH(APCHO)) Q:APCHO'=+APCHO D FMH2
  1. FMHX K APCHSDFN,APCHSN,APCHSICD,APCHSDAT,APCHSNRQ,APCHSICL,APCHSDFN,APCHTFH,APCHS,APCHZ,APCHR,APCHD
  1. Q
  1. LDM(I) ;get last date modified of Family History or relation
  1. I $G(I)="" Q ""
  1. I '$D(^AUPNFH(I,0)) Q ""
  1. NEW J,D,E
  1. S D=""
  1. S J=$P(^AUPNFH(I,0),U,9) I J S D=$P($G(^AUPNFHR(J,0)),U,9) I D="" S D=$P($G(^AUPNFHR(J,0)),U,9)
  1. S E=$P(^AUPNFH(I,0),U,12) I E>D S D=E
  1. S E=$P(^AUPNFH(I,0),U,3) I E>D S D=E
  1. Q D
  1. FMH2 ;
  1. S APCHS="",APCHC=0 F S APCHS=$O(APCHTFH(APCHO,APCHS)) Q:APCHS=""!($D(APCHSQIT)) D
  1. .S APCHZ="" F S APCHZ=$O(APCHTFH(APCHO,APCHS,APCHZ)) Q:APCHZ=""!($D(APCHSQIT)) D
  1. ..S APCHR="" F S APCHR=$O(APCHTFH(APCHO,APCHS,APCHZ,APCHR)) Q:APCHR=""!($D(APCHSQIT)) D
  1. ...S APCHTD=$O(APCHTFH(APCHO,APCHS,APCHZ,APCHR,0)),APCHTD=(9999999-APCHTD) S Y=APCHTD X APCHSCVD S APCHTDAT=Y S:APCHTDAT="/" APCHTDAT=""
  1. ...S APCHD="",APCHC=0 F S APCHD=$O(APCHTFH(APCHO,APCHS,APCHZ,APCHR,APCHD)) Q:APCHD=""!($D(APCHSQIT)) D
  1. ....S APCHSDFN="" F S APCHSDFN=$O(APCHTFH(APCHO,APCHS,APCHZ,APCHR,APCHD,APCHSDFN)) Q:APCHSDFN=""!($D(APCHSQIT)) D FHDSP
  1. ;S APCHSDFN="" F APCHSQ=0:0 S APCHSDFN=$O(^AUPNFH("AC",APCHSPAT,APCHSDFN)) Q:APCHSDFN="" D FHDSP
  1. ; <CLEANUP>
  1. Q
  1. FHDSP S APCHC=APCHC+1
  1. I APCHC=1 W !,APCHTDAT,?14,APCHZ," Status: "
  1. S APCHSTAT=""
  1. I 'APCHR,APCHSDFN D
  1. .S APCHSTAT=$S($P(^AUPNFH(APCHSDFN,0),U,6)]"":$$VAL^XBDIQ1(9000014,APCHSDFN,.06),1:"None")
  1. I APCHR S APCHSTAT=$S($P($G(^AUPNFHR(APCHR,0)),U,4)]"":$$VAL^XBDIQ1(9000014.1,APCHR,.04),1:"None")
  1. I APCHC=1 W APCHSTAT,!
  1. I APCHR,$P(^AUPNFHR(APCHR,0),U,5)]""!($P(^AUPNFHR(APCHR,0),U,6)]"") D
  1. .I APCHC=1 W ?14,"Age at Death: ",$$VAL^XBDIQ1(9000014.1,APCHR,.05)," Cause of Death: ",$S($P(^AUPNFHR(APCHR,0),U,6)]"":$P(^AUPNFHR(APCHR,0),U,6),1:"Data Not Available"),!
  1. I APCHR,$P(^AUPNFHR(APCHR,0),U,7)]""!($P(^AUPNFHR(APCHR,0),U,8)]"") D
  1. .I APCHC=1 W ?14,"Multiple Birth: "_$$VAL^XBDIQ1(9000014.1,APCHR,.07)_$S($P(^AUPNFHR(APCHR,0),U,7)="Y":" Multiple Birth Type: "_$$VAL^XBDIQ1(9000014.1,APCHR,.08),1:""),! ;_" Date Updated: "_$$VAL^XBDIQ1(9000014.1,R,.09)
  1. Q:'APCHSDFN
  1. S APCHSN=^AUPNFH(APCHSDFN,0)
  1. S APCHSICD=$P(APCHSN,U,1) D GETICDDX^APCHSUTL
  1. ;S Y=$P(APCHSN,U,3) X APCHSCVD S APCHSDAT=Y
  1. S APCHSNRQ=$P(APCHSN,U,4)
  1. S APCHSNRQ=$$PNPROB^AUPNVUTL(APCHSNRQ) ;D GETNARR^APCHSUTL
  1. X APCHSCKP Q:$D(APCHSQIT) ; W !,APCHSDAT
  1. S (X,R,S,N,A,P)=""
  1. ;S R=$$VAL^XBDIQ1(9000014,APCHSDFN,.07)
  1. S APCHSNRQ=APCHSNRQ ;_" ("_$$VAL^XBDIQ1(9000014,APCHSDFN,.01)_")"
  1. S A="" I APCHSDFN S A=$$VAL^XBDIQ1(9000014,APCHSDFN,.05) I $P(^AUPNFH(APCHSDFN,0),U,15) S A=A_" (APPROXIMATE)" ;I A="" S A=$$VAL^XBDIQ1(9000014,APCHSDFN,.05)
  1. ;S S=$$VAL^XBDIQ1(9000014,APCHSDFN,.06)
  1. ;S P=$$VAL^XBDIQ1(9000014,APCHSDFN,.08)
  1. ;S X=R
  1. ;I X]"" S X=X_"; "
  1. S X=APCHSNRQ
  1. S X=X_$S(A]"":"; Age at Onset: "_A,1:"; Age at Onset: None")
  1. ;S X=X_$S(S]"":"; Status: "_S,1:"; Status: None")
  1. ;S X=X_$S(P]"":"; Documented By: "_P,1:"")
  1. S APCHSICL=14,APCHSNRQ=X
  1. D PRTICD^APCHSUTL
  1. Q
  1. ;
  1. PWH ;EP - called from component Patient wellness Handout
  1. ; <SETUP>
  1. X APCHSCKP Q:$D(APCHSQIT) X:'APCHSNPG APCHSBRK
  1. ; <DISPLAY>
  1. K APCHTFH
  1. S APCHSIVD="" F S APCHSIVD=$O(^APCHPWHL("AA",APCHSPAT,APCHSIVD)) Q:APCHSIVD=""!(APCHSIVD>APCHSDLM) D
  1. .S APCHIEN=0 F S APCHIEN=$O(^APCHPWHL("AA",APCHSPAT,APCHSIVD,APCHIEN)) Q:APCHIEN'=+APCHIEN D
  1. ..S APCHSN=$G(^APCHPWHL(APCHIEN,0))
  1. ..I APCHSN="" Q
  1. ..S N=$$VAL^XBDIQ1(9001027,APCHIEN,.02)
  1. ..S $P(APCHTFH(N),U)=$P($G(APCHTFH(N)),U)+1
  1. ..S P=$P(APCHTFH(N),U)+1
  1. ..S $P(APCHTFH(N),U,P)=$$DATE^APCHSMU($P(^APCHPWHL(APCHIEN,0),U,4))
  1. ;now display
  1. I '$D(APCHTFH) W "No Patient Wellness Handouts given to this patient.",! Q
  1. W ?2,"PATIENT WELLNESS HANDOUT TYPE",?34,"# given",?42,"Dates Last 4 Given to Patient",!
  1. W $$REPEAT^XLFSTR("-",79),!
  1. S APCHSN="" F S APCHSN=$O(APCHTFH(APCHSN)) Q:APCHSN=""!($D(APCHSQIT)) D
  1. .S O=$P(APCHTFH(APCHSN),U,2,99)
  1. .S N=$L(O,U)
  1. .W ?2,APCHSN,?34,$P(APCHTFH(APCHSN),U) W ?42,$P(O,U,N)," ",$P(O,U,N-1)," ",$P(O,U,N-2)," ",$P(O,U,N-3),!
  1. .Q
  1. K APCHTFH,APCHSN
  1. Q
  1. AMI ;EP - called from health summary AMI component
  1. K APCHSTXA
  1. ; <SETUP>
  1. Q:'$D(^AUPNVAMI("AA",APCHSPAT))
  1. X APCHSBRK
  1. ; <DISPLAY>
  1. X APCHSCKP Q:$D(APCHSQIT)
  1. S APCHARR=9999999999,APCHSDLZ=9999999-APCHSDLM
  1. F S APCHARR=$O(^AUPNVAMI("AA",APCHSPAT,APCHARR),-1) Q:APCHARR=""!($P(APCHARR,".")<APCHSDLZ) D
  1. .S APCHSIVD=0 F S APCHSIVD=$O(^AUPNVAMI("AA",APCHSPAT,APCHARR,APCHSIVD)) Q:APCHSIVD=""!(APCHSIVD>APCHSDLM) D
  1. ..;table them by date,problem or problem,date depending on the component
  1. ..S X=0 F S X=$O(^AUPNVAMI("AA",APCHSPAT,APCHARR,APCHSIVD,X)) Q:X'=+X D
  1. ...Q:$P($G(^AUPNVAMI(X,5)),U,1) ;entered in error
  1. ...S D=9999999-$P(+^AUPNVAMI(X,0),".",1)
  1. ...S APCHSTXA("DATE",D,X)=""
  1. D WRITEAMI
  1. ; <CLEANUP>
  1. AMIX K APCHARR,APCHSTXA,APCHORD,APCHSICL,APCHSTXT,APCHSNRQ
  1. Q
  1. WP ;
  1. K ^UTILITY($J,"W")
  1. I '$O(^AUPNVAMI(APCHX,2,0)) W ! Q
  1. NEW APCHY
  1. S APCHY=0
  1. S DIWL=17,DIWR=79 F S APCHY=$O(^AUPNVAMI(APCHX,2,APCHY)) Q:APCHY'=+APCHY D
  1. .S X=^AUPNVAMI(APCHX,2,APCHY,0) D ^DIWP
  1. .Q
  1. S Z=0 F S Z=$O(^UTILITY($J,"W",DIWL,Z)) Q:Z'=+Z!($D(APCHSQIT)) D
  1. .X APCHSCKP Q:$D(APCHSQIT)
  1. .W ?17,^UTILITY($J,"W",DIWL,Z,0),!
  1. K DIWL,DIWR,DIWF,Z
  1. K ^UTILITY($J,"W"),APCHY
  1. Q
  1. WRITEAMI ;
  1. S APCHSIVD=0 F S APCHSIVD=$O(APCHSTXA("DATE",APCHSIVD)) Q:APCHSIVD=""!($D(APCHSQIT)) D
  1. .X APCHSCKP Q:$D(APCHSQIT)
  1. .S APCHX=0 F S APCHX=$O(APCHSTXA("DATE",APCHSIVD,APCHX)) Q:APCHX=""!($D(APCHSQIT)) D
  1. ..W ?3,"Arrived at: ",$$GET1^DIQ(9000010.62,APCHX,.01),!
  1. ..W ?3,"Onset of symptoms: ",$$GET1^DIQ(9000010.62,APCHX,.04),!
  1. ..W ?6,"Symptoms: "
  1. ..D WP
  1. ..W ?3,"EKG done: ",$$GET1^DIQ(9000010.62,APCHX,.07),!
  1. ..;loop through 14 node and display EKG findings
  1. ..;.01 concept id ,.02 DESC id | .03,, .06 interpreted by
  1. ..S APCHY=0 F S APCHY=$O(^AUPNVAMI(APCHX,14,APCHY)) Q:APCHY'=+APCHY!($D(APCHSQIT)) D
  1. ...;X APCHSCKP Q:$D(APCHSQIT)
  1. ...S APCHZ=$G(^AUPNVAMI(APCHX,14,APCHY,0))
  1. ...;W ?6,$$CONCPT^AUPNVUTL($P(APCHZ,U,1)),!
  1. ...S X="EKG Interpretation: "_$$DESCPT^AUPNVUTL($P(APCHZ,U,2))_"|"_$$GET1^DIQ(9000010.6214,APCHY_","_APCHX,.03)
  1. ...S APCHSNRQ="",APCHSTXT=X,APCHSICL=6 D PRTTXT^APCHSUTL
  1. ...X APCHSCKP Q:$D(APCHSQIT)
  1. ...W ?6,"Interpreted by: ",$$GET1^DIQ(9000010.6214,APCHY_","_APCHX,.06),!
  1. ..;loop through 13 node and display protocols initiated
  1. ..;.01 free text ,.02 date/time, .03 entered by
  1. ..X APCHSCKP Q:$D(APCHSQIT)
  1. ..W ?3,"Standing orders/Protocols Initiated",!
  1. ..S APCHY=0 F S APCHY=$O(^AUPNVAMI(APCHX,13,APCHY)) Q:APCHY'=+APCHY!($D(APCHSQIT)) D
  1. ...X APCHSCKP Q:$D(APCHSQIT)
  1. ...S APCHZ=^AUPNVAMI(APCHX,13,APCHY,0)
  1. ...S X=$$GET1^DIQ(9000010.6213,APCHY_","_APCHX,.01)_" "_$$GET1^DIQ(9000010.6213,APCHY_","_APCHX,.02)_" by "_$$GET1^DIQ(9000010.6213,APCHY_","_APCHX,.04)
  1. ...S APCHSNRQ="",APCHSTXT=X,APCHSICL=6 D PRTTXT^APCHSUTL
  1. ..I $P(^AUPNVAMI(APCHX,0),U,11)]"" W ?3,"Fibrinolytic therapy started at: ",$$GET1^DIQ(9000010.62,APCHX,.11)," by ",$$GET1^DIQ(9000010.62,APCHX,.13),!
  1. ..I $P(^AUPNVAMI(APCHX,0),U,14)]"" D
  1. ...W ?3,"Fibrinolytic Not Started: ",$$GET1^DIQ(9000010.62,APCHX,.14)," by ",$$GET1^DIQ(9000010.62,APCHX,.16),!
  1. ...W ?3,"Reason Not Started: ",$$GET1^DIQ(9000010.62,APCHX,.17),!
  1. .W !
  1. Q
  1. STROKE ;EP - called from component
  1. K APCHSTXA
  1. ; <SETUP>
  1. Q:'$D(^AUPNVSTR("AA",APCHSPAT)) ;no stroke data
  1. X APCHSBRK
  1. ; <DISPLAY>
  1. X APCHSCKP Q:$D(APCHSQIT)
  1. S APCHARR=9999999999,APCHSDLZ=9999999-APCHSDLM
  1. F S APCHARR=$O(^AUPNVSTR("AA",APCHSPAT,APCHARR),-1) Q:APCHARR=""!($P(APCHARR,".")<APCHSDLZ) D
  1. .S APCHSIVD=0 F S APCHSIVD=$O(^AUPNVSTR("AA",APCHSPAT,APCHARR,APCHSIVD)) Q:APCHSIVD=""!(APCHSIVD>APCHSDLM) D
  1. ..;table them by date,problem or problem,date depending on the component
  1. ..S X=0 F S X=$O(^AUPNVSTR("AA",APCHSPAT,APCHARR,APCHSIVD,X)) Q:X'=+X D
  1. ...Q:$P($G(^AUPNVSTR(X,5)),U,1) ;entered in error
  1. ...S D=9999999-$P(+^AUPNVSTR(X,0),".",1)
  1. ...S APCHSTXA("DATE",D,X)=""
  1. D WRITEST
  1. ; <CLEANUP>
  1. STROKEX K APCHARR,APCHSTXA,APCHORD,APCHSICL,APCHSTXT,APCHSNRQ,APCHNODE
  1. Q
  1. WPSTR ;
  1. K ^UTILITY($J,"W")
  1. I '$O(^AUPNVSTR(APCHX,APCHNODE,0)) W ! Q
  1. NEW APCHY
  1. S APCHY=0
  1. S DIWL=17,DIWR=79 F S APCHY=$O(^AUPNVSTR(APCHX,APCHNODE,APCHY)) Q:APCHY'=+APCHY D
  1. .S X=^AUPNVSTR(APCHX,APCHNODE,APCHY,0) D ^DIWP
  1. .Q
  1. S Z=0 F S Z=$O(^UTILITY($J,"W",DIWL,Z)) Q:Z'=+Z!($D(APCHSQIT)) D
  1. .X APCHSCKP Q:$D(APCHSQIT)
  1. .W ?17,^UTILITY($J,"W",DIWL,Z,0),!
  1. K DIWL,DIWR,DIWF,Z
  1. K ^UTILITY($J,"W"),APCHY
  1. Q
  1. WRITEST ;
  1. S APCHSIVD=0 F S APCHSIVD=$O(APCHSTXA("DATE",APCHSIVD)) Q:APCHSIVD=""!($D(APCHSQIT)) D
  1. .X APCHSCKP Q:$D(APCHSQIT)
  1. .S APCHX=0 F S APCHX=$O(APCHSTXA("DATE",APCHSIVD,APCHX)) Q:APCHX=""!($D(APCHSQIT)) D
  1. ..W ?3,"Arrived at: ",$$GET1^DIQ(9000010.63,APCHX,.01),!
  1. ..W ?6,"Symptoms: "
  1. ..;loop through 14 node and display SYMPTOMS findings
  1. ..;.01 concept id ,.02 DESC id | .03,, .0 WITNESSED by
  1. ..S APCHY=0 F S APCHY=$O(^AUPNVSTR(APCHX,14,APCHY)) Q:APCHY'=+APCHY!($D(APCHSQIT)) D
  1. ...;X APCHSCKP Q:$D(APCHSQIT)
  1. ...S APCHZ=^AUPNVSTR(APCHX,14,APCHY,0)
  1. ...W ?6,$$CONCPT^AUPNVUTL($P(APCHZ,U,1)),!
  1. ...S X=$$DESCPT^AUPNVUTL($P(APCHZ,U,2))_"|"_$$GET1^DIQ(9000010.6314,APCHY_","_APCHX,.03)
  1. ...S APCHSNRQ="",APCHSTXT=X,APCHSICL=6 D PRTTXT^APCHSUTL
  1. ...X APCHSCKP Q:$D(APCHSQIT)
  1. ...W ?6,"Witnessed by: ",$$GET1^DIQ(9000010.6314,APCHY_","_APCHX,.07),!
  1. ...W ?6,"Date/Time Witnessed: ",$$GET1^DIQ(9000010.6314,APCHY_","_APCHX,.08),!
  1. ..;handedness
  1. ..X APCHSCKP Q:$D(APCHSQIT)
  1. ..S APCHY=0,APCHZ="" F S APCHY=$O(^AUPNVSTR(APCHX,2,APCHY)) Q:APCHY'=+APCHY!($D(APCHSQIT)) D
  1. ...S:APCHZ]"" APCHZ=APCHZ_"; "
  1. ...S APCHZ=APCHZ_$$GET1^DIQ(9000010.632,APCHY_","_APCHX,.019)
  1. ..W ?6,"Handedness: ",APCHZ,!
  1. ..;loop through 13 node and display protocols initiated
  1. ..;.01 free text ,.02 date/time, .03 entered by
  1. ..X APCHSCKP Q:$D(APCHSQIT)
  1. ..S APCHY=$$WT(APCHX)
  1. ..I APCHY]"" W ?6,"Weight: ",$P(APCHY,U)," lbs ("_$P(APCHY,U,2),")",!
  1. ..;X APCHSCKP Q:$D(APCHSQIT)
  1. ..;total score stroke
  1. ..S APCHY=0 F S APCHY=$O(^AUPNVSTR(APCHX,15,APCHY)) Q:APCHY'=+APCHY!($D(APCHQIT)) D
  1. ...X APCHSCKP Q:$D(APCHSQIT)
  1. ...W ?6,"Stroke Score: ",$$GET1^DIQ(9000010.6315,APCHY_","_APCHX,.19)," @ ",$$GET1^DIQ(9000010.6315,APCHY_","_APCHX,.02),!
  1. ..X APCHSCKP Q:$D(APCHSQIT)
  1. ..W ?3,"Standing orders/Protocols Initiated",!
  1. ..S APCHY=0 F S APCHY=$O(^AUPNVSTR(APCHX,13,APCHY)) Q:APCHY'=+APCHY!($D(APCHSQIT)) D
  1. ...X APCHSCKP Q:$D(APCHSQIT)
  1. ...S APCHZ=^AUPNVSTR(APCHX,13,APCHY,0)
  1. ...S X=$$GET1^DIQ(9000010.6313,APCHY_","_APCHX,.01)_" "_$$GET1^DIQ(9000010.6313,APCHY_","_APCHX,.02)_" by "_$$GET1^DIQ(9000010.6313,APCHY_","_APCHX,.04)
  1. ...S APCHSNRQ="",APCHSTXT=X,APCHSICL=6 D PRTTXT^APCHSUTL
  1. ..I $P(^AUPNVSTR(APCHX,0),U,11)]"" W ?3,"Fibrinolytic therapy started at: ",$$GET1^DIQ(9000010.63,APCHX,.11)," by ",$$GET1^DIQ(9000010.3,APCHX,.13),!
  1. ..I $P(^AUPNVSTR(APCHX,0),U,14)]"" D
  1. ...W ?3,"Fibrinolytic Not Started: ",$$GET1^DIQ(9000010.63,APCHX,.14)," by ",$$GET1^DIQ(9000010.63,APCHX,.16),!
  1. ...W ?3,"Reason Not Started: ",$$GET1^DIQ(9000010.63,APCHX,.17),!
  1. .W !
  1. Q
  1. WT(V) ;IS THERE A WEIGHT ON THIS DATE?
  1. NEW D,A,B,C,P
  1. S A=$$VALI^XBDIQ1(9000010.63,V,.03)
  1. I 'A Q ""
  1. I '$D(^AUPNVSIT(A,0)) Q ""
  1. S D=$P($P(^AUPNVSIT(A,0),U),".")
  1. S P=$$VALI^XBDIQ1(9000010.63,V,.02)
  1. I 'P Q ""
  1. S C=$$LASTITEM^APCLAPIU(P,"WT","MEASUREMENT",D,D,"A")
  1. I C="" Q ""
  1. Q $P(C,U,3)_U_$$VAL^XBDIQ1(9000010.01,$P(C,U,6),1201)