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

ACHSTXFT.m

Go to the documentation of this file.
ACHSTXFT ; IHS/OIT/FCJ - EXPORT DATA - RECORD 2U(UFMS)FOR TESTING OF LIVE DATA
 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;**13**;JUN 11,2001
 ;ACHS*3.1*13 IHS/OIT/FCJ NEW ROUTINE
 ;This routine is being used to generate test data for UFMS from live data
 ;Will no longer be needed once UFMS has gone live
 ;
S1 ;EP FROM ACHSTX2
 S ACHSCTYP=""
 S ACHSDEST=$P(ACHSDOCR,U,17),ACHSCTY=ACHSTY
 S ACHSDFY=$P(ACHSDOCR,U,27),X1=$E($P(ACHSDOCR,U,27),4)  ;Four digit FY
 D FYCVT^ACHSFU
 S ACHSARCO=$P($G(^ACHSF(DUZ(2),0)),U,11)   ;AREA CONTRACTING NO.
 S X=$P($G(^ACHSF(DUZ(2),"D",2)),U,9) I X S ACHSCTYP=$P($G(^ACHSCTYP(X,0)),U,2)  ;CONTRACT PURCHASE TYPE
 S:$L(ACHSCTYP)=0 ACHSCTYP=" "
 S ACHSPROV=$P(ACHSDOCR,U,8)
 S:ACHSFED="" ACHSFED=" "
 S ACHSEIN=$TR($P(^AUTTVNDR(ACHSPROV,11),U,13)," -,+","")
 I ACHSEIN="" S ACHSEIN=$TR($P(^AUTTVNDR(ACHSPROV,11),U)_$P(^AUTTVNDR(ACHSPROV,11),U,2)," -,+","")
 S X=$L(ACHSEIN) I X'=12 F I=1:1:12-X  S ACHSEIN=ACHSEIN_" "
 S ACHSDUNS=$P(^AUTTVNDR(ACHSPROV,0),U,7) S X=$L(ACHSDUNS) I X'=13 F I=1:1:13-X  S ACHSDUNS=ACHSDUNS_" "
 ;SET ACHSDATA
 S ACHSRCT=ACHSRCT+1         ;RECORD COUNT
 S ACHSRTYP(8)=ACHSRTYP(8)+1
 S ^ACHSDATA(ACHSRCT)="U2"_ACHSEFDT_ACHSCDE_$S(ACHSTOS=1:323,ACHSTOS=2:324,ACHSTOS=3:325,1:"")_"HHSI"_ACHSARCO_ACHSDFY_ACHSXLOC_$P(ACHSDOCR,U)_ACHSCTYP_$J("",3)_"1"_X1
 S ^ACHSDATA(ACHSRCT)=^ACHSDATA(ACHSRCT)_ACHSCAN_ACHSOBJC_ACHSIPA_ACHSFED_ACHSEIN_$J("",54)_$E(ACHSDFY,3,4)_ACHSDEST_" "_ACHSXLOC_ACHSDUNS_$J("",10)
 ;
 I $L(^ACHSDATA(ACHSRCT))'=161 W !!,*7,*7,"A DHR RECORD WAS PRODUCED THAT WAS NOT 161 CHARACTERS IN LENGTH:",!!,^(ACHSRCT),!,*7,*7 S ACHSERR=1
 ;
CVTEND1 ;
 W $J(ACHSRCT,8)
 S ACHSROUT=ACHSRCT
 S:ACHSRCT>2 ACHSROUT=ACHSRCT
 K ACHSDUNS,X1,ACHSDFY,ACHSEIN
 Q
 ;