$$PRTM |
$$PRTM(SCTEAM,SCDATES,SCUSRA,SCROLEA,SCLIST,SCERR) --
Extrinsic function call to return an array of practitioners who are assigned
to positions on a team for a time period.
Output: @SCLIST() = array of practitioners
Format:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of NEW PERSON file entry (#200)
2 Name of person
3 IEN of TEAM POSITION file (#404.57)
4 Name of Position
5 IEN OF USR CLASS(#8930) of POSITION (#404.57
6 USR Class Name
7 IEN of STANDARD POSITION (#403.46)
8 Standard Role (Position) Name
9 Activation Date for 404.52 (not 404.59!)
10 Inactivation Date for 404.52
11 IEN of Position Ass History (404.52)
12 IEN of Preceptor Position
13 Name of Preceptor Position
SCERR() = Array of DIALOG file messages(errors) . @SCERR(0)= Number of
error(s), UNDEFINED if no errors
Foramt:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of DIALOG file
Returned: 1 if ok, 0 if error
|
|
$$PRCL |
$$PRCL(SC44,SCDATES,SCPOSA,SCUSRA,SCROLEA,SCLIST,SCERR) -- Extrinsic function
to return a list of practitioners associated to a clinic in PCMM. There is an
association if the practitioner is assigned to a position for the time period
and that position has the clinic as its ASSOCIATED CLINIC. Note: Multiple
positions can have the same clinic.
@SCLIST() = array of practitioners
Format:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of NEW PERSON file entry (#200)
2 Name of person
3 IEN of TEAM POSITION file (#404.57)
4 Name of Position
5 IEN OF USR CLASS(#8930) of POSITION (#404.57)
6 USR Class Name
7 IEN of STANDARD POSITION (#403.46)
8 Standard Role (Position) Name
9 Activation Date for 404.52 (not 404.59!)
10 Inactivation Date for 404.52
11 IEN of Position Ass History (404.52)
12 IEN of Preceptor Position
13 Name of Preceptor Position
@sclist@('scpr',sc200,sctp,scact,scn)=""
SCERR() = Array of DIALOG file messages(errors) .
Foramt: @SCERR@(0) = Number of errors, undefined if none
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of DIALOG file
Returned: 1 if ok, 0 if error
|
|
$$PRPT |
$$PRPT(DFN,SCDATES,SCPOSA,SCUSRA,SCROLEA,SCPURPA,SCLIST,SCERR) -- Extrinsic
function to return a list of practitioners assigned to a patient. The
practitioner is assigned to a patient if both the patient and the practitioner
are assigned to a position for the time period.
SCLIST() = array of practitioners
Format:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of NEW PERSON file entry (#200)
2 Name of person
3 IEN of TEAM POSITION file (#404.57)
4 Name of Position
5 IEN OF USR CLASS(#8930) of POSITION (#404.57)
6 USR Class Name
7 IEN of STANDARD POSITION (#403.46)
8 Standard Role (Position) Name
9 Activation Date for 404.52 (not 404.59!)
10 Inactivation Date for 404.52
11 IEN of Position Ass History (404.52)
12 IEN of Preceptor Position
13 Name of Preceptor Position
SCERR() = Array of DIALOG file messages(errors) . @SCERR(0)= Number of
error(s), UNDEFINED if no errors
Foramt:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of DIALOG file
Returned: 1 if ok, 0 if error
|
|
$$PTTM |
$$PTTM(SCTEAM,SCDATES,SCLIST,SCERR) -- Extrinsic
function to return a list of patients assigned to a team for a time period.
@SCLIST() = array of patients
Format:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of PATIENT file entry
2 Name of patient
3 IEN of Patient Team Assignment
4 Activation Date
5 Inactivation Date
6 Patient Long ID (SSN)
SCERR() = Array of DIALOG file messages(errors) . @SCERR@(0)=number of
errors, undefined if none
Foramt:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of DIALOG file
Returned: 1 if ok, 0 if error
|
|
$$TMPT |
$$TMPT(DFN,SCDATES,SCPURPA,SCLIST,SCERR) Extrinsic
function to return a list of teams assigned to a patient fo time period.
Output:
@SCLIST() = array of teams (includes SCTM xref)
Format:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of TEAM file entry
2 Name of team
3 IEN of file #404.42 (Pt Tm Assignment)
4 current effective date
5 current inactivate date (if any)
6 pointer to 403.47 (purpose)
7 Name of Purpose
8 Is this the pt's PC Team?
Subscript: "SCTM",SCTM,IEN =""
SCERR() = Array of DIALOG file messages(errors) .
@SCERR@(0) = number of errors, undefined if none
Format:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of DIALOG file
Returned: 1 if ok, 0 if error ;
|
|
$$INSTPCTM |
$$INSTPCTM(DFN,SCEFF) -- Extrinsic function to retrun
the institution and team for the patient's prinmary care team for a given
date.
Returned - 0 if not ok (error), otherwise:
Piece# Description
1 Pointer to the File #404.51
2 Name of Team
3 Pointer to File #4
4 Name of Institution
|
VARIABLES |
TYPE |
VARIABLES DESCRIPTION |
DFN |
Input |
DFN - - Pointer to File #2, PATIENT File
|
SC44 |
Input |
SC44 - Pointer to File #44, Hospital Location File (clinic)
|
SCTEAM |
Input |
SCTEAM - Pointer to File #404.51, TEAM File
|
SCEFF |
Input |
SCEFF - Effective Date of interest
|
SCDATES |
Input |
SCDATES - Name of date array to define time period as follows:
@SCDATES@("BEGIN") = begin date to search (inclusive)
[default: TODAY]
("END") = end date to search (inclusive)
[default: TODAY]
("INCL") = 1: only use pracitioners who were on
team for entire date range
0: anytime in date range
[default: 1]
|
SCUSRA |
Input |
SCUSRA = Name of array of usr classes to use/exclude
@SCUSRA@(ptr)="", where ptr is a pointer to File #8930
if $D(@SCUSRA@("EXCLUDE")) -> list to exclude
|
SCROLEA |
Input |
SCROLEA = Name of array of roles/standard positions to
include/exclude
@SCROLEA@(ptr)="" where ptr is a pointer to File #403.46
if $D(@(SCROLEA@("EXCLUDE")) ->list to exclude
|
SCPURPA |
Input |
SCPURPA = Name of array of team purposes to include/exclude
@SCPURPA@(ptr)="" where ptr is a pointer to File #403.47
if $D(@SCPURPA@("EXCLUDE")) -> list to exclude
|
SCLIST |
Output |
SCLIST = Name of output array (local or ^TMP reference)
Example using $$PRTM:
>S SCTEAM=1 ;1 is ien of 404.51 entry >S RWD("BEGIN")=DT-30
;Time period starts 30 days ago >S RWD("END")=DT+30 ;and ends 30
days from now >S RWD("INCL")=0 ;list if active any time in period
>W $$PRTM^SCAPMC(SCTEAM,"RWD",,,"RWOUT","RWERR") 1 >ZW RWOUT RWOUT(0)=2
RWOUT(1)=1212^INSLEY,MARCIA L.^1^AAA ROB 1^^^2^PHYSICIAN-PRIMARY
CARE^2960627^^1
^^
RWOUT(2)=10866^WHELAN,ROBERT^2^AAA ROB NURSE^^^6^NURSE (RN)^2960627^^2^1^AAA
ROB
1 RWOUT("SCPR",1212,1,2960627,1)= RWOUT("SCPR",10866,2,2960627,2)=
|
|
$$PTPR |
VARIABLES:
$$PTPR(SC200,SCDATES,SCPURPA,SCROLEA,SCLIST,SCERR,SCYESCL)- Extrinsic function
call to return an array of patients for a practitioner within a time period.
Output:
SCLIST() = array of patients
Format:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of PATIENT file entry
2 Name of patient
3 IEN of Pt Team Posit Asment if position=source
4 Activation Date
5 Inactivation Date
6 Source 1=Clinic, Null=Position
7 IEN of Clinic if clinic=source
SCERR() = Array of DIALOG file messages(errors) .
@SCERR@(0) = number of errors, undefined if none
Format:
Subscript: Sequential # from 1 to n
Piece Description
1 IEN of DIALOG file
Returned: 1 if ok, 0 if error
|
VARIABLES |
TYPE |
VARIABLES DESCRIPTION |
SC200 |
Input |
ien of NEW PERSON file(#200) [required]
|
SCDATES |
Input |
SCDATES("BEGIN") = begin date to search (inclusive)
[default: TODAY]
("END") = end date to search (inclusive)
[default: TODAY]
("INCL") = 1: only use patients who were assigned to
team for entire date range
0: anytime in date range
[default: 1]
|
SCPURPA |
Input |
array of pointers to team purpose file 403.47
; if none are defined - returns all teams
; if @SCPURPA@('exclude') is defined - exclude listed teams
|
SCROLEA |
Input |
array of pointer to 403.46 (per SCPURPA)
|
SCLIST |
Input |
array name to store list [ex. ^TMP("SCPT",$J)]
|
SCERR |
Input |
array NAME to store error messages.
|
|