source: FOIAVistA/trunk/r/DSS_EXTRACTS-ECX/ECXQSR1.m@ 1452

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1ECXQSR1 ;ALB/JAP,BIR/PTD-DSS QUASAR Extract ; 6/5/07 12:09pm
2 ;;3.0;DSS EXTRACTS;**105**;Dec 22, 1997;Build 70
3FILE ;file record in #727.825
4 ;node0
5 ;inst^dfn ECXDFN^ssn ECXSSN^name ECXPNM^i/o status ECXA^day ECDAY^
6 ;DSS unit ECDU^^category ECPTTM^procedure ECP^volume ECV^cost center^
7 ;ordering sec ^section^provider ECXPRV1^ECXPPC1^ECXPRV2^ECXPPC2^ECXPRV3^
8 ;ECXPPC3^mov # ECXMN^treat spec ECXTS^time ECTIME^primary care team
9 ;ECPTTM^primary care provider ECPTPR^pce cpt code & modifers ECXCPT^
10 ;primary icd-9 code ECDIA^secondary icd-9 #1 ECXICD91^secondary icd-9
11 ;#2 ECXICD92^secondary icd-9 #3 ECXICD93^secondary icd-9 #4 ECXICD94^
12 ;agent orange ECXAST^radiation exposure ECRST^environmental
13 ;contaminants ECEST^service connected ECSC^sent to pce^^dss identifier
14 ;ECDSS^placeholder
15 ;node1
16 ;mpi ECXNPI^dss dept ECXDSSD^^^^placeholder
17 ;^assoc pc provider ECASPR^assoc pc prov person class
18 ;ECCLAS2^placeholder^divison ECXDIV^dom ECXDOM^
19 ;enrollment category ECXCAT^enrollment status ECXSTAT^enrollment prior
20 ;ECXPRIOR^period of service ECXPOS^purple heart ECXPHI^observ pat ind
21 ;ECXOBS^encounter num ECXENC^ao loc ECXAOL^ord div ECXODIV^contr st dt
22 ;ECXCSDT^contr end dt ECXCEDT^contr typ ECXCTYP^CNH stat ECXCNH^
23 ;production division ECXPDIV^eligibility ECXELIG^ethnicity ECXETH^
24 ;race1 ECXRC1^enrollment location ECXENRL^^enrollment priority
25 ;ECXPRIOR_enrollment subgroup ECXSBGRP^user enrollee ECXUESTA^patient
26 ;type ECXPTYPE^combat vet elig ECXCVE^combat vet elig end date ECXCVEDT^
27 ;enc cv eligible ECXCVENC^national patient record flag ECXNPRFI^
28 ;emergency response indicator(FEMA) ECXERI^agent orange indicator
29 ;ECXAO^environ contam ECXECE^head/neck ECXHNC^military sexual trauma
30 ;ECXMIL^radiation encoun ECXIR^nutrition dx(currently null)^OEF/OIF ECXOEF^
31 ;OEF/OIF return date ECXOEFDT^assoc pc provider npi ECASNPI^
32 ;primary care provider npi ECPTNPI^provider npi ECPR1NPI^
33 ;provider #2 npi ECPR2NPI^provider #3 npi ECPR3NPI
34 N DA,DIK
35 S EC7=$O(^ECX(ECFILE,999999999),-1),EC7=EC7+1
36 S ECODE=EC7_U_EC23_U
37 S ECODE=ECODE_ECL_U_ECXDFN_U_ECXSSN_U_ECXPNM_U_ECXA_U_ECDAY_U_ECDU_U_U
38 S ECODE=ECODE_ECP_U_ECV_U_ECCS_U_ECO_U_ECM_U_ECXPRV1_U_ECXPPC1_U
39 S ECODE=ECODE_ECXPRV2_U_ECXPPC2_U_ECXPRV3_U_ECXPPC3_U_U
40 S ECODE=ECODE_ECXMN_U_ECXTS_U_ECTIME_U_ECPTTM_U
41 S ECODE=ECODE_ECPTPR_U_ECXCPT_U_ECDIA_U_ECXICD91_U_ECXICD92_U
42 S ECODE=ECODE_ECXICD93_U_ECXICD94_U_ECXAST_U_ECXRST_U_ECXEST_U
43 S ECODE=ECODE_ECSC_U_"N"_U_U_ECDSS_U_U
44 S ECODE1=ECXMPI_U_ECXDSSD_U_U_U_U_ECCLAS_U_U_ECASPR_U
45 S ECODE1=ECODE1_ECCLAS2_U_U_ECXDIV_U_ECXMST_U_ECXDOM_U
46 S ECODE1=ECODE1_ECXDOB_U_ECXCAT_U_ECXSTAT_U_$S(ECXLOGIC<2005:ECXPRIOR,1:"")_U_ECXPOS_U_ECXPHI_U
47 S ECODE1=ECODE1_ECXOBS_U_ECXENC_U_ECXAOL_U_ECXODIV_U_ECXCSDT_U_ECXCEDT_U
48 S ECODE1=ECODE1_ECXCTYP_U_ECXCNH_U_ECXPDIV_U_ECXELIG_U_ECXHNCI_U_ECXETH_U
49 S ECODE1=ECODE1_ECXRC1
50 I ECXLOGIC>2003 S ECODE1=ECODE1_U_ECXENRL
51 I ECXLOGIC>2004 S ECODE1=ECODE1_U_U_ECXPRIOR_ECXSBGRP_U_ECXUESTA_U_ECXPTYPE_U_ECXCVE_U
52 I ECXLOGIC>2004 S ECODE2=ECXCVEDT_U_ECXCVENC_U_ECXNPRFI
53 I ECXLOGIC>2006 S ECODE2=ECODE2_U_ECXERI_U_ECXAO_U_ECXECE_U_ECXHNC_U_ECXMIL_U_ECXIR_U
54 I ECXLOGIC>2007 S ECODE2=ECODE2_U_$G(ECXOEF)_U_$G(ECXOEFDT)_U_$G(ECASNPI)_U_$G(ECPTNPI)_U_$G(ECPR1NPI)_U_$G(ECPR2NPI)_U_$G(ECPR3NPI)
55 S ^ECX(ECFILE,EC7,0)=ECODE,^ECX(ECFILE,EC7,1)=ECODE1,^ECX(ECFILE,EC7,2)=$G(ECODE2),ECRN=ECRN+1
56 S DA=EC7,DIK="^ECX("_ECFILE_"," D IX1^DIK K DIK,DA
57 I $D(ZTQUEUED),$$S^%ZTLOAD
58 Q
59SETUP ;Set required input for ECXTRAC
60 S ECHEAD="ECQ"
61 D ECXDEF^ECXUTL2(ECHEAD,.ECPACK,.ECGRP,.ECFILE,.ECRTN,.ECPIECE,.ECVER)
62 Q
63QUE ;Entry point for the background requeuing handled by ECXTAUTO.
64 D SETUP,QUE^ECXTAUTO,^ECXKILL Q
Note: See TracBrowser for help on using the repository browser.