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

BIDE.m

Go to the documentation of this file.
BIDE ;IHS/CMI/MWR - BUILD ^BIEXPDD GLOBAL.
 ;;8.5;IMMUNIZATION;**10**;MAY 30,2015
 ;;* MICHAEL REMILLARD, DDS * CIMARRON MEDICAL INFORMATICS, FOR IHS *
 ;;  UTILITY: BUILD ^BIEXPDD GLOBAL.
 ;;  PATCH 10: Add two new Skin Test Data Elements.  TABLE+88
 ;
 ;
 ;----------
START ;EP
 D KGBL^BIUTL8("^BIEXPDD")
 S ^BIEXPDD(0)="BI TABLE DATA ELEMENT^9002084.91I"
 N I,X,Y,Z
 F I=1:1 S X=$T(@"TABLE"+I) Q:X'[";;"  D
 .S Y=$P(X,";;",2),Z=$P(X,";;",3)
 .S ^BIEXPDD(Y,0)=Z
 N DIK S DIK="^BIEXPDD(" D IXALL^DIK
 Q
 ;
 ;
 ;----------
TABLE ; EP
 ;;1;;LASTNAME,FIRSTNAME MI^S Y=$$NAME~BIUTL1(BIDFN)^NAME^A
 ;;2;;LASTNAME ONLY^S Y=$$NAME~BIUTL1(BIDFN,3)^NAME^A
 ;;3;;FIRSTNAME ONLY^S Y=$$NAME~BIUTL1(BIDFN,2)^NAME^A
 ;;4;;VACCINE NAME, SHORT^S Y=$$VNAME~BIUTL2($P(BI0,U))^VS^I
 ;;5;;CHART#^S Y=$$HRCN~BIUTL1(BIDFN,DUZ(2))^HRCN^A
 ;;6;;DOSE#^S Y=$P(BI0,U,4)^SERIES^I
 ;;7;;DATE OF BIRTH (MM/DD/YYYY)^S Y=$$DOB~BIUTL1(BIDFN),Y=$$SLDT2~BIUTL5(Y)^DOB^A
 ;;8;;VACCINE COMPONENT IENS^ S Y=$$VCOMPS~BIUTL2($P(BI0,U))^COMPS^I
 ;;9;;VACCINE NAME, LONG^S Y=$$VNAME~BIUTL2($P(BI0,U),1)^VL^I
 ;;10;;SE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T1~BIUTL5(Y)^DOB^A
 ;;29;;DATE OF VISIT (DD-Mmm-YYYY @HHMM)^S Y=$$IMMDTT~BIUTL6(BIVPTR,,1)^DOV^A
 ;;30;;VACCINE NAME, IEN^S Y=$P(BI0,U)^VIEN^I
 ;;31;;VACCINE MAXIMUM DOSE#^S Y=$$VMAX~BIUTL2($P(BI0,U))^MAXIM^I
 ;;32;;VACCINE LOT NUMBER, IEN^S Y=$P(BI0,U,5)^LOT^I
 ;;33;;VACCINE LOT NUMBER, TEXT^S Y=$P(BI0,U,5) S:+Y Y=$P($G(~AUTTIML($P(BI0,U,5),0)),U)^LOT^I
 ;;34;;LOCATION IEN^S Y=$P(~AUPNVSIT(BIVPTR,0),U,6)^IEN^A
 ;;35;;CATEGORY OF VISIT^S Y=$P(~AUPNVSIT(BIVPTR,0),U,7)^VISIT^A
 ;;36;;LOCATION OF VISIT OTHER (TEXT)^S Y=$$INSTTX1~BIUTL6(BIVPTR,1,2)^OTHER^A
 ;;37;;LOCATION OF VISIT IHS (TEXT)^S Y=$$INSTTX1~BIUTL6(BIVPTR,1,1)^VISIT^A
 ;;38;;SKIN TEST RESULT^S Y=$$SKRESLT~BIUTL6($P(BI0,U,4))^RES^S
 ;;39;;SKIN TEST READING^S Y=$P(BI0,U,5)^READ^S
 ;;40;;SKIN TEST DATE READ (MM/DD/YY)^S Y=$$SLDT2~BIUTL5($P(BI0,U,6),1)^DATE^S
 ;;41;;SKIN TEST NAME^S Y=$$SKNAME~BIUTL6($P(BI0,U))^TEST^S
 ;;42;;SKIN TEST NAME IEN^S Y=$P(BI0,U)^TEST^S
 ;;43;;VACCINE REACTION, IEN^S Y=$P(BI0,U,6)^VRX^I
 ;;44;;VACCINE REACTION, TEXT^S Y=$$REACTXT~BIUTL6($P(BI0,U,6))^VRT^I
 ;;45;;MOTHER'S HBSAG STATUS^S Y=$$MOTHER~BIUTL11(BIDFN,1)^HB^A
 ;;46;;PARENT OR GUARDIAN^S Y=$$PARENT~BIUTL1(BIDFN)^GUARD^A
 ;;47;;CASE MANAGER^S Y=$$CMGR~BIUTL1(BIDFN)^^A
 ;;48;;DATE INACTIVE (DD-Mmm-YYYY)^S Y=$$TXDT1~BIUTL5($$INACT~BIUTL1(BIDFN))^INACT^A
 ;;49;;VACCINE INFO STMT (1=YES, 2=NO)^S Y=$P(BI0,U,11)^VIS^I
 ;;50;;VAC INFO STMT DATE FM (YYYMMDD)^S Y=$P(BI0,U,12)^VISD^I
 ;;51;;VAC INFO STMT DATE (DD-Mmm-YYYY)^S Y=$P(BI0,U,12),Y=$$TXDT1~BIUTL5(Y)^VISD^I
 ;;52;;VACCINE CODE, CPT^S Y=$$CODE~BIUTL2($P(BI0,U),2)^CPT^I
 ;;55;;VACCINE GRP IEN (SERIES TYPE)^S Y=$$IMMVG~BIUTL2($P(BI0,U),2)^GROUP^I
 ;;56;;DATE OF VISIT FILEMAN (YYYMMDD)^S Y=$P($P($G(~AUPNVSIT(+BIVPTR,0)),U),".")^DOVF^A
 ;;57;;AGE AT VISIT^S Y=$$AGEF~BIUTL1(BIDFN,$P($P($G(~AUPNVSIT(+BIVPTR,0)),U),"."))^AV^A
 ;;58;;PATIENT DFN^S Y=BIDFN^DFN^A
 ;;59;;VISIT, PPC TYPE^S Y=$P(~AUPNVSIT(+BIVPTR,0),U,3)^TYPE^A
 ;;60;;DATE OF VISIT (DD-Mmm-YYYY)^S Y=$P($G(~AUPNVSIT(+BIVPTR,0)),U),Y=$$TXDT1~BIUTL5(Y)^DOV^A
 ;;61;;PROVIDER, ENCOUNTER IEN^S Y=$P(BI012,U,4)^^A
 ;;62;;CURRENT COMMUNITY TEXT^S Y=$$CURCOM~BIUTL11(BIDFN,1)^COMM^A
 ;;63;;MOTHER'S MAIDEN NAME^S Y=$$MOTHMAID~BIUTL11(BIDFN)^MAIDEN^A
 ;;64;;PATIENT BENEFICIARY TYPE^S Y=$$BENTYP~BIUTL11(BIDFN,1)^BENEFI^A
 ;;65;;DOSE OVERRIDE^S Y=$P(BI0,U,8)^OVRD^I
 ;;66;;DATE OF VISIT YY (MM/DD/YY)^S Y=$P($P($G(~AUPNVSIT(+BIVPTR,0)),U),"."),Y=$$SLDT2~BIUTL5(Y,1)^DOVYY^A
 ;;67;;INJECTION SITE^S Y=$P(BI0,U,9)^IS^A
 ;;68;;VOLUME^S Y=$P(BI0,U,11)^^A
 ;;69;;VACCINE COMPONENT CVX CODE^S Y=$$CODE~BIUTL2($P(BI0,U))^COMP^I
 ;;70;;SKIN TEST READER^S Y=$P(BI0,U,8)^READER^S
 ;;71;;REASON INACTIVE^S Y=$$INACTRE~BIUTL1(BIDFN)^INACT^A
 ;;72;;LOCATION MOVED OR TX ELSEWHERE^S Y=$$MOVEDLOC~BIUTL1(BIDFN)^MOVED^A
 ;;73;;VACCINE CODE, HL7-CVX LEADING ZERO^S Y=$$CODE~BIUTL2($P(BI0,U),6)^HL70^I
 ;;74;;CPT-CODED VISIT^S Y=$P(BI0,U,13)^CPTC^I
 ;;75;;PROVIDER, NAME^S Y=$P(BI012,U,4) S:Y Y=$P($G(~VA(200,Y,0)),U)^^A
 ;;76;;VISIT IEN^S Y=$P(BI0,U,3)^VIEN^A
 ;;77;;ELIG CODE, IEN^S Y=$P(BI0,U,14)^VFC^I
 ;;78;;IMPORTED FROM OUTSIDE REGISTRY^S Y=$P(BI0,U,15)^IMPORT^I
 ;;79;;CONSENT STATE REGISTRY^S Y=$$CONSENT~BIUTL1(BIDFN)^CONS^A
 ;;80;;NDC CODE, IEN^S Y=$P(BI0,U,16)^NDCPTR^I
 ;;82;;ELIG CODE, TEXT^S Y=$$ELIGC~BIELIG($P(BI0,U,14),1)^ELIGTX^I
 ;;83;;ELIG CODE, LABEL^S Y=$$ELIGC~BIELIG($P(BI0,U,14),2)^ELIGLB^I
 ;;84;;NDC CODE, TEXT^S Y=$$NDC~BINDC($P(BI0,U,16),1)^NDCTXT^I
 ;;85;;DATE OF EVENT OR VISIT (MM/DD/YY)^S Y=$$IMMDTT~BIUTL6(BIVPTR,$G(BI012))^DATEVT^A
 ;;86;;DATE OF EVENT OR VISIT (YYYMMDD)^S Y=$$IMMDTT~BIUTL6(BIVPTR,$G(BI012),2)^DOEVFM^A
 ;;87;;ADMINISTRATIVE NOTE^S Y=$P(BI01,U,1)^BIANOT^A
 ;;88;;DATE OF VISIT TCH (YYYYMMDD)^S Y=$P($P($G(~AUPNVSIT(+BIVPTR,0)),U),"."),Y=$$FMTCHDT~BIUTL5(Y)^DOVTCH^A
 ;;89;;DATE VIS PRESENTED FM (YYYMMDD)^S Y=$P(BI0,U,17)^DATVIS^I
 ;;90;;DATE VIS PRESENTED (MM/DD/YY)^I $P(BI0,U,17) S Y=$$SLDT2~BIUTL5($P(BI0,U,17))^DTVISL^I
 ;;91;;DATE ADMIN SHOT--EVENT ONLY^S Y=$$IMMDTT~BIUTL6(,$G(BI012))^DADMIN^I
 ;;92;;SKIN TEST LOT NUMBER IEN^S Y=$P(BI0,U,14)^SK LOT^S
 ;;93;;SKIN TEST LOT NUMBER TEXT^S Y=$P(BI0,U,14) S:+Y Y=$P($G(~AUTTIML($P(BI0,U,14),0)),U)^SK LOT^S