Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Call Graph |  Entry Points |  External References |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables  | All
Print Page as PDF
Routine: NHINVSIT

Package: National Health Information Network

Routine: NHINVSIT


Information

NHINVSIT ;SLC/MKB -- Visit/Encounter extract

Source Information

Source file <NHINVSIT.m>

Call Graph

Call Graph

Call Graph Total: 8

Package Total Call Graph
VA FileMan 2 FIND^DIC  $$GET1^DIQ  
CPT HCPCS Codes 1 $$CPT^ICPTCOD  
DRG Grouper 1 ($$ICDD,$$ICDDX)^ICDCODE  
Kernel 1 ($$NS,$$STA)^XUAF4  
National Health Information Network 1 ($$ESC,$$FAC)^NHINV  
PCE Patient Care Encounter 1 ENCEVENT^PXAPI  
Registration 1 IN5^VADPT  

Entry Points

Name Comments DBIA/ICR reference
EN(DFN,BEG,END,MAX,ID) ; -- find patient's visits and appointments
ENAA(DFN,BEG,END,MAX,ID) ; -- find patient's visits and appointments [AA]
IDT ; -- invert BEG and END dates for visit format:
; IDT=(9999999-$P(VDT,"."))_"."_$P(VDT,".",2)
EN1(IEN,VST) ; -- return a visit in VST("attribute")=value
TIU(VISIT) ; -- add notes to VST("document")
POV(VISIT) ; -- return the primary Purpose of Visit as ICD^ProviderNarrative
ICD(IEN) ; -- return code^description for ICD code, or "^" if error
CPT(VISIT) ; -- Return CPT code of encounter type
AMIS(X) ; -- return the AMIS code^name of Credit Stop X
CATG(X) ; -- Return name of visit Service Category code X
SERV(FTS) ; -- Return #42.4 Service for a Facility Treating Specialty
ADM(IEN,DATE,ADM) ; -- return an admission in ADM("attribute")=value
ENC(IEN,ENC) ; -- return an encounter in ENC("attribute")=value
XML(VISIT) ; -- Return patient visit as XML
LOOP() ; -- build sub-items string from NAMES and X
ADD(X) ; -- Add a line @NHIN@(n)=X

External References

Name Field # of Occurrence
FIND^DIC TIU+2
$$GET1^DIQ TIU+7, POV+4, SERV+2, ADM+12, ENC+8, ENC+11
$$ICDD^ICDCODE ICD+4
$$ICDDX^ICDCODE ICD+2
$$CPT^ICPTCOD EN1+13, ADM+19
$$ESC^NHINV XML+14, LOOP+2
$$FAC^NHINV EN1+21, ADM+17, ENC+10
ENCEVENT^PXAPI EN1+3
IN5^VADPT ADM+3
$$NS^XUAF4 EN1+9
$$STA^XUAF4 EN1+9

FileMan Files Accessed Via FileMan Db Call

FileNo Call Tags
^DGPM - [#405] GET1^DIQ
^SCE - [#409.68] GET1^DIQ
^SC - [#44] GET1^DIQ
^DIC(45.7 - [#45.7] GET1^DIQ
^TIU(8925 - [#8925] FIND^DIC,  GET1^DIQ
^AUTNPOV - [#9999999.27] GET1^DIQ

Global Variables Directly Accessed

Name Line Occurrences  (* Changed,  ! Killed)
^AUPNVSIT("AA" ENAA+6, ENAA+7
^AUPNVSIT("AET" EN+12, EN+13, EN+14
^DIC(40.7 - [#40.7] AMIS+2
^DIC(42 - [#42] ADM+15
^SC - [#44] EN1+14, EN1+17, ADM+16, ENC+6
^SCE - [#409.68] ENC+3
^TMP("PXKENC" EN1+4, EN1+24, EN1+28!, POV+2, CPT+2
^VA(200 - [#200] EN1+25

Label References

Name Line Occurrences
$$AMIS EN1+16, EN1+18, EN1+20
$$CATG EN1+10, EN1+14, ADM+19, ENC+13, ENC+14
$$CPT EN1+13, ADM+19
$$ICD POV+3, ADM+14
$$LOOP XML+10, XML+15
$$POV EN1+22, ADM+11
$$SERV EN1+19, ADM+10, ENC+9
ADD XML+2, XML+3, XML+5, XML+10, XML+11, XML+16
ADM EN1+6
EN1 EN+6, EN+15, ENAA+4, ENAA+8
IDT ENAA+5
TIU EN1+27
XML EN+6, EN+16, ENAA+4, ENAA+9

Naked Globals

Name Field # of Occurrence
^( EN1+24, POV+2, CPT+2
^(150 EN1+4

Local Variables

Legend:

>> Not killed explicitly
* Changed
! Killed
~ Newed

Name Field # of Occurrence
ADM ADM~, ADM+1!
ADM("arrivalDateTime" ADM+6*
ADM("dateTime" ADM+6*
ADM("departureDateTime" ADM+21*
ADM("facility" ADM+17*
ADM("id" ADM+4*
ADM("location" ADM+16*
ADM("patientClass" ADM+4*
ADM("provider" ADM+7*, ADM+8*
ADM("reason" ADM+11*, ADM+13*, ADM+14*
ADM("roomBed" ADM+17*
ADM("service" ADM+10*
ADM("serviceCategory" ADM+18*
ADM("specialty" ADM+9*
ADM("type" ADM+19*
ADM("visitString" ADM+23*
ATT XML+1~, XML+3*, XML+4, XML+5, XML+6, XML+7, XML+8, XML+9, XML+10, XML+11
, XML+12, XML+13, XML+14, XML+15
BEG EN~, EN+3*, EN+12, ENAA~, ENAA+3*, ENAA+6, IDT+2, IDT+3*
CATG EN1+1~, EN1+8*, EN1+10, EN1+11, EN1+12, EN1+14
CNT TIU+1~, TIU+3*, TIU+8*
DA ENAA+1~, ENAA+7*, ENAA+8, EN1+1~, EN1+24*, EN1+25, TIU+1~, TIU+6*, TIU+7, TIU+8
, POV+1~, POV+2*, CPT+1~, CPT+2*
DATE ADM~, ADM+2*, ADM+3, ADM+6*, ADM+23, ENC+1~, ENC+4*, ENC+15
DFN EN~, EN+2*, EN+12, EN+13, EN+14, ENAA~, ENAA+2*, ENAA+6, ENAA+7
ENC ENC~, ENC+1!
ENC("dateTime" ENC+4*
ENC("facility" ENC+10*
ENC("id" ENC+3*
ENC("location" ENC+7*
ENC("patientClass" ENC+12*
ENC("service" ENC+9*
ENC("serviceCategory" ENC+14*
ENC("type" ENC+13*
ENC("visitString" ENC+15*
END EN~, EN+3*, EN+9*, EN+12, ENAA~, ENAA+3*, ENAA+6, IDT+3, IDT+4*
FAC EN1+1~, EN1+8*, EN1+9, EN1+21
FTS SERV~, SERV+1*, SERV+2
HLOC ADM+1~, ADM+15*, ADM+16, ADM+17, ADM+23, ENC+1~, ENC+5*, ENC+6*, ENC+7, ENC+8
, ENC+10, ENC+13, ENC+15
I TIU+1~, TIU+3*, TIU+4*, TIU+5, TIU+6, ICD+1~, ADM+1~, ADM+6*, ADM+7*, ADM+8*
, XML+6*, XML+7
ICD POV+1~, POV+3*, POV+4, ADM+1~, ADM+14*
ID EN~, EN+6, ENAA~, ENAA+4
IDT ENAA+1~, ENAA+6*, ENAA+7
IEN EN1~, EN1+2*, EN1+3, EN1+4, EN1+6, EN1+7, EN1+13, EN1+22, EN1+24, EN1+27
, EN1+28, ICD~, ICD+1*, ICD+2, ADM~, ADM+2*, ADM+4, ADM+11, ADM+19, ENC~
, ENC+2*, ENC+3, ENC+11
INPT EN1+1~, EN1+12*, EN1+14, EN1+15
L0 EN1+17~*, EN1+18, EN1+19, EN1+20
LOC EN1+1~, EN1+8*, EN1+11, EN1+14, EN1+16, EN1+17, EN1+21
LT TIU+1~, TIU+5*, TIU+8
MAX EN~, EN+3*, EN+12, ENAA~, ENAA+3*, ENAA+6
N ICD+1~, ICD+4*, ICD+5
NAMES XML+1~, XML+7*, XML+8*, XML+9*, XML+13*, LOOP+2
NHDA EN+1~, EN+14*, EN+15
NHDT EN+1~, EN+12*, EN+13, EN+14
NHICNT EN+1~, EN+10*, EN+12, EN+16*, ENAA+1~, ENAA+5*, ENAA+6, ENAA+9*
NHIN TIU+1~, ADD+2
NHIN("DILIST" TIU+4, TIU+5, TIU+6
>> NHINI ADD+1*, ADD+2
>> NHINTOTL XML+2*
NHITM EN+1~, EN+6, EN+15!, EN+16, ENAA+1~, ENAA+4, ENAA+8!, ENAA+9
NHLOC EN+1~, EN+13*, EN+14
NHX ICD+1~
NHX(1 ICD+5
NT TIU+1~, TIU+7*, TIU+8
P LOOP+1~, LOOP+2*
STR LOOP+1~*, LOOP+2*, LOOP+3
STS ENC+1~, ENC+11*, ENC+12
TAG LOOP+1~, LOOP+2*
TYPE ENC+1~, ENC+12*, ENC+13, ENC+14, ENC+15
U EN1+5, EN1+6, EN1+8, EN1+9, EN1+10, EN1+12, EN1+13, EN1+14, EN1+16, EN1+18
, EN1+19, EN1+20, EN1+25, TIU+8, POV+2, POV+3, POV+4, ICD+3, ICD+4, ICD+5
, CPT+3, AMIS+2, ADM+9, ADM+11, ADM+13, ADM+14, ADM+16, ADM+17, ADM+19, ENC+5
, ENC+6, ENC+7, ENC+13, ENC+14, LOOP+2
VAERR ADM+1~
VAIP ADM+1~
VAIP("D" ADM+3*
VAIP(1 ADM+3, ADM+12
VAIP(17 ADM+20, ADM+21
VAIP(18 ADM+8
VAIP(3 ADM+6
VAIP(5 ADM+15
VAIP(6 ADM+17
VAIP(7 ADM+7
VAIP(8 ADM+9, ADM+10
VAIP(9 ADM+11, ADM+13, ADM+14
VISIT TIU~, TIU+2, POV~, POV+2, CPT~, CPT+2, XML~
VISIT( XML+3, XML+4, XML+6, XML+7, XML+12
VST EN1~, EN1+6
VST("creditStopCode" EN1+20*
VST("dateTime" EN1+7*
VST("document" TIU+8*
VST("facility" EN1+9*, EN1+21*
VST("id" EN1+7*
VST("location" EN1+19*
VST("patientClass" EN1+15*
VST("provider" EN1+25*
VST("reason" EN1+22*
VST("service" EN1+19*
VST("serviceCategory" EN1+10*
VST("stopCode" EN1+16*, EN1+18*
VST("type" EN1+13*, EN1+14*
VST("visitString" EN1+11*
X IDT+2~*, IDT+4, EN1+1~, EN1+13*, EN1+14, EN1+16*, EN1+18, EN1+20*, TIU+1~, POV+1~
, POV+3*, POV+4, ICD+1~, CPT+1~, CPT+3*, AMIS~, AMIS+2, CATG~, CATG+2, CATG+3
, CATG+4, CATG+5, CATG+6, CATG+7, CATG+8, CATG+9, CATG+10, CATG+11, CATG+12, CATG+13
, ADM+10*, ADM+11*, ADM+12*, ADM+13, ADM+14, ADM+19*, ENC+1~, ENC+8*, ENC+9, ENC+12*
, XML+1~, XML+7*, XML+12*, XML+14, XML+15, LOOP+2, ADD~, ADD+2
X0 EN1+1~, EN1+4*, EN1+5, EN1+6, EN1+7, EN1+8, EN1+11, EN1+16, EN1+24*, EN1+25
, POV+1~, POV+2*, POV+3, ICD+1~, ICD+2*, ICD+3, CPT+1~, CPT+2*, CPT+3, AMIS+2*
, ENC+1~, ENC+3*, ENC+4, ENC+5
X15 EN1+1~, EN1+4*, EN1+5, EN1+12
Y TIU+1~, TIU+3*, POV+1~*, POV+2, POV+4*, POV+5, ICD+1~, ICD+3*, ICD+4, ICD+5*
, ICD+6, CPT+1~*, CPT+2, CPT+3*, CPT+4, AMIS+1~*, AMIS+2*, AMIS+3, CATG+1~*, CATG+2*
, CATG+3*, CATG+4*, CATG+5*, CATG+6*, CATG+7*, CATG+8*, CATG+9*, CATG+10*, CATG+11*, CATG+12*
, CATG+13*, CATG+14, SERV+1~*, SERV+2*, SERV+3, ENC+1~, XML+1~, XML+3, XML+4*, XML+10*
, XML+12*, XML+14*, XML+15*
Info |  Source |  Call Graph |  Entry Points |  External References |  FileMan Files Accessed Via FileMan Db Call |  Global Variables Directly Accessed |  Label References |  Naked Globals |  Local Variables  | All