source: FOIAVistA/trunk/r/DSS_EXTRACTS-ECX/ECXTRT2.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1ECXTRT2 ;ALB/JAP,BIR/DMA,CML,PTD-Treating Specialty Change Extract ; 04/12/2007
2 ;;3.0;DSS EXTRACTS;**105**;Dec 22, 1997;Build 70
3 ;
4FILE ;file the extract record
5 ;node0
6 ;^dfn^ssn^name^i/o (ECXA)^date^product^adm date^d/c date^
7 ;mov#^type^new ts^losing ts^losing ts los^
8 ;losing attending^movement type^time^adm time^new provider^
9 ;new attending^losing provider
10 ;node1
11 ;mpi^dss dept^placeholder^placeholder^placeholder^
12 ;placeholder^losing attending los^losing provider los^dom^
13 ;observ pat ind^encounter num
14 ;^losing attending physician npi^losing prim ward provider npi^
15 ;new attending physician npi^new primary ward provider npi
16 ;^product division code^losing attending physician PC^new primary ward
17 ;provider pc^new attending physician pc^losing primary ward prov pc^
18 ;new attending physician npi^new primary ward provider npi^
19 ;
20 ;convert specialties to PTF Codes for transmission
21 ;
22 N ECXDATA
23 S ECXDATA=$$TSDATA^DGACT(42.4,+ECXSPCN,.ECXDATA)
24 S ECXSPCN=$G(ECXDATA(7))
25 S ECXDATA=$$TSDATA^DGACT(42.4,+ECXSPCL,.ECXDATA)
26 S ECXSPCL=$G(ECXDATA(7))
27 ;done
28 S EC7=$O(^ECX(ECFILE,999999999),-1),EC7=EC7+1
29 S ECODE=EC7_U_EC23_U_U_ECXDFN_U_ECXSSN_U_ECXPNM_U_ECXA_U_ECXDATE_U_U
30 S ECODE=ECODE_ECXADMDT_U_ECXDCDT_U_ECDA_U_6_U_ECXSPCN_U_ECXSPCL_U
31 S ECODE=ECODE_ECXLOS_U_ECXATTL_U_ECMT_U_ECXTIME_U_ECXADMTM_U_ECXPRVN_U
32 S ECODE=ECODE_ECXATTN_U_ECXPRVL_U
33 S ECODE1=ECXMPI_U_ECXDSSD_U_U_U_U_U
34 S ECODE1=ECODE1_ECXLOSA_U_ECXLOSP_U_ECXDOM_U_ECXOBS_U_ECXENC_U_ECXPDIV
35 I ECXLOGIC>2005 S ECODE1=ECODE1_U_ECXATLPC_U_ECXPRNPC_U_ECXATNPC_U_ECXPRLPC
36 I ECXLOGIC>2007 S ECODE1=ECODE1_U_ECATLNPI_U_ECPRLNPI_U_ECATTNPI_U_ECPRVNPI
37 S ^ECX(ECFILE,EC7,0)=ECODE,^ECX(ECFILE,EC7,1)=ECODE1,ECRN=ECRN+1
38 S DA=EC7,DIK="^ECX("_ECFILE_"," D IX1^DIK K DIK,DA
39 I $D(ZTQUEUED),$$S^%ZTLOAD S QFLG=1
40 Q
41 ;
42SETUP ;Set required input for ECXTRAC
43 S ECHEAD="TRT"
44 D ECXDEF^ECXUTL2(ECHEAD,.ECPACK,.ECGRP,.ECFILE,.ECRTN,.ECPIECE,.ECVER)
45 Q
46 ;
47QUE ; entry point for the background requeuing handled by ECXTAUTO
48 D SETUP,QUE^ECXTAUTO,^ECXKILL
49 Q
Note: See TracBrowser for help on using the repository browser.