BMXADOXY ; IHS/CIHA/GIS - RPC CALL: GENERATE AN ADO SCHEMA STRING AND DATA SET ;
Source file <BMXADOXY.m>
Name | Comments | DBIA/ICR reference |
---|---|---|
AA | ; ITERATE USING AA INDEX
; INDEX IS 'AA" THE START AND STOP DATES ARE SPECIFIED IN EXTERNAL FORMAT. MAX=10 ; THE FOLLOWING FILTERS ARE SPECIFIED IN THE LAST PARAMETER ("235|WT|C"): ; 235=PATIENT DFN #235 ; WT=RETURN ONLY WEIGHTS. MEASUREMENT TYPE MUST BE SPECIFIED WITH A VALID, UNAMBIGUOUS LOOKUP VALUE. ; C=RETRUN VALUES IN CHRONOLOGICAL ORDER USE 'R' INSTEAD OF 'C' FOR REVERSE CHRONOLOGICAL ORDER. DEFAULT=C ; THE SEED PARAMTER IS SET AND CAN BE USED TO RETURN DATA IN CHUNKS |
|
SUB | ; SUBFILE ITERATION
; THE SCHEMA IS ATTACHED TO THE MEDICARE ELIGIBILITY FILE/ELIG DATE SUBFILE ; THE DA STRING HAS A VALUE OF '4,',: THE IEN IN THE PARENT FILE (PATIENT DFN). ; NOTE THE COMMA IN THE DA STRING. THIS INDICATES THAT THE FILE IEN IS 4 BUT THE SUBFILE IEN IS UNSPECIFIED |
|
DINUM | ; DINUMED POINTER ITERATION
; THE SCHEMA IS ATTACHED TO THE PATIENT FILE (9000001) ; THE PATIENT FILE IS DINUM'D AND ITS .01 FIELD POINTS TO THE VA PATIENT FILE (2) ; BECAUSE OF THE SPECIAL RELATIONSHIP BETWEEN THE FILES, WE CAN USE THE B INDEX OF FILE 2 TO ITERATE FILE 9000001. |
|
HWSTD | ;
; PATIENT DFN=235, INDEX=AA, MAX=5, START=3/21/65, STOP=6/4/04 |
|
DEL | ; DELETE A RECORD
; THE SIPLEST WAY TO DELETE AN ENTRY IS TO PUT THE RECORD IEN IN THE DA STRING PRECEDED BY A MINUS SIGN ; YOU CAN ALSO SET THE VALUE OF THE .01 FIELD TO "@" ; IF THE VALUE OF THE .01 FIELD IS NULL AND THE DA STRING IS NOT PRECEDED BY A MINUS SIGN, THE TRANSACTION WILL BE CANCELLED ; IF THE DA STRING IS NULL, THE TRANSACTION WILL BE CANCELLED ; IN THIS EXAMPLE, WE DELETE A V MEASUREMENT RECORD THAT WAS JUST ADDED |
|
CIT | ; CUSTOM ITERATOR
; IF COMPLEX OR UNUSUAL SORTING/FILTERING IS REQUITED, USE A CUSTOM ITERATOR ; THE CUSTOM ITERATOR IS DEFINED BY 6TH, 7TH AND 8TH PIECES IN THE VSTG ; PIECE 8=TAG, PIECE 9=ROUTINE, PIECE 8=A PARAMETER PASSED TO THE ENTRY POINT ; THE 9TH PIECE CONTAINS PT DFN, TIMESTAMP, VISIT TYPE, LOC IEN, AND SERVICE CATEGORY IN A "|" DELIMTED STRING ; THE ITERATOR CALL TAG^ROUTINE(PARAM) TO GENERATE IENS ; IN THIS CASE THE SCHEMA IS ATTACHED TO THE VISIT FILE. ; GIVEN THE INFORMATION IN THE PARAMETER, THE CUSTOM ITERATOR RETURNS POSSIBLE DUPLICATE VISITS |
|
JSTD | ; STANDARD JOIN
; BY SPECIFYING A JOIN IN THE VSTG, MULTIPLE SCHEMAE AND DATA SETS ARE RETURNED IN ONE PASS ; THE SCHEMA IS ATTACHED TO THE V MEASUREMENT FILE ; THIS IS JOINED TO A SECOND FILE, THE VA PATIENT FILE VIA A JOIN ; THE JOIN IS BASTED ON THE FACT THAT THE PATIENT FIELD (.02) IN THE V MEASUREMENT FILE POINTS TO THE VA PATIENT FILE ; THE JOIN PARAMETER IS THE 9TH PIECE OF THE VSTG. IT CONSISTS OF 2 PIECES DELIMITED BY A "," ; PIECE 1 IS THE SCHEMA THAT YOU ARE JOINING TO ; PIECE 2 IS THE FIELD IN THE PRIMARY FILE THAT ENABLES THE JOIN ; THE DATA SET FROM THE SECOND (JOIN) FILE CONTAINS ONLY THOSE RECORDS NECESSARY TO COMPLETE THE JOIN ; PATIENT DFN=235, INDEX=AA, MAX=5, START=3/21/65, STOP=6/4/04 |
|
DELVAL | ; DELETE A VALUE IN A FIELD
; SIMILAR TO EDIT EXCEPT THE VALUE IS "@" ; DELETE WILL BE ABORTED IF IF FILEMAN SAYS THIS IS A REQUIRED FIELD |
|
RIT | ||
NUM | ; ITERATE BY IEN
; IX="",START WITH IEN=1, STOP AFTER IEN=20, MAX # RECORDS RETURNED = 5 ; TO VIEW INTERNAL VALUES SET VSTG="~1~20~5~I" |
|
JMD | ;JOIN MASTER TO DETAIL
|
|
DISP(OUT) | ; TEMP DISPLAY OF THE ANR
|
|
IX | ; ITERATE BY INDEX
; ITERATE USING THE "B" INDEX ; START WITH PT NAME "C", STOP AFTER PATIENT NAME = "D", MAX # RECORDS RETURNED = 5 |
|
JSUB | ; SUBFILE JOIN
; IN THIS CASE THE RECORDS IN A PARENT FILE ARE "JOINED" TO THE RECORDS IN ONE OF ITS SUB FILES ; THE SCHEMA IS ATTACHED TO THE "MEDICARE ELIGIBLE" FILE ; IT IS JOINED TO ITS SUBFILE, "ELIG DATES", VIA THE UPDATE MEDICARE DATES SCHEMA ; THE SYNTAX FOR THE JOIN PIECE IS "sien2,SUB" WHERE sien2=IEN OF SECOND SCHEMA ; PATIENT DFN=4 |
|
ADD | ; ADD A NEW ENTRY
; THIS IS A 2 STEP PROCESS: ; FIRST GET THE SCHEMA FOR THE FILE YOU WISH TO UPDATE ; THIS SCHEMA'S NAME TYPICALLY BEGINS WITH THE WORD "UPDATE" ; IT CONTAINS NO ID OR IEN FIELDS ; SECOND ADD THE DATA NODE TO THE ARRAY ; IT HAS THE SAME FORMAT AS A DATA STRING ASSOCIATED WITH THE SCHEMA EXCEPT THE FIRST "^" PIECE IS NULL ; THIS PIECE CORRESPONDS TO THE IEN OF THE RECORD. SINCE THE RECORD HAS NOT BEEN ADDED YET, IT IS NULL. ; IN THE DATA STRING, ALL POINTER VALUES ARE PRECEDED BY THE '`' CHARACTER AND EA. STRING ENDS IN $C(30) ; MULTIPLE DATA STRINGS CAN BE APPENDED AS NEW NODES AT THE BOTTOM OF THE ARRAY ; IN THIS CASE WE ARE ADDING A RECORD TO THE V MEASUREMENT FILE ; DATA STRING="^MEASUREMENT TYPE IEN^PATIENT DFN^VISIT IEN^RESULT"_$C(30) ; THERE ARE 2 INPUT PARAMS: ; THE CLOSED REF WHERE THE INPUT ARRAY IS STORED ; SINCE IT IS PASSED BY REFERENCE "OUT" CAN BE NULL OR UNDEFIEND. ; OUT WILL BE DEFINED AT THE CONCLUSION OF THE TRANSACTION. ; THE OUTPUT IS IN THE OUT ARRAY ; OUT(1)="OK|ien" WHERE ien IS THE IEN OF THE RECORD THAT HAS BEE ADDED. ; IF THE TRANSACTION FAILED, AN ERROR MSG WILL BE IN THE OUT ARRAY ; MEASUREMENT TYPE=2, PATIENT DFN=2, VISIT IEN=7806, PATIENT'S WEIGHT=172.75 |
|
RENT | ; ITERATE IN CHUNKS
; RE-ITERATE USING THE "B" INDEX ; START WITH PT IEN 5 AS THE "SEED", STOP AFTER PATIENT NAME = "D", MAX # RECORDS RETURNED = 5 |
|
JPAR | ; PARENT FILE JOIN
; SIMILAR TO A SUBFILE JOIN EXCEPT THE SUB-FILE IS TREATED AS THE PRIMARY FILE AND IT IS JOINED TO ITS PARENT ; BECAUSE WE ARE STARTING IN A SUBFILE, THE DA STRING CONTAINS THE IEN OF THE PARENT FILE ("4," ; THE SYNTAX OF THE 9TH PIECE IS "sien2,PARENT" WHERE sien2 IS THE IEN OF THE SECONDARY SCHEMA ; PATIENT DFN=4 |
|
IXP | ; INDEXED POINTER ITERATION
; THE SCHEMA IS ATTACHED TO THE V POV FILE ; THE AC CROSS REFERENCE INDEXES THE PATIENT FIELD ; BY STARTING AND STOPING WITH PATIENT 235 (MAX=5) WE COLLECT THE FIRST 5 POVS FOR PATIENT 235 IN THE FILE |
|
ID | ; IDENTIFIER FIELD
; THE SCHEMA IS ATTACHED TO THE VA PATIENT FILE (2) ; THE SCHEMA HAS A BUILT IN FIELD (.01ID) THAT RETURNS THE IDENTIFIERS ; THE ENTRY POINT THAT GENERATES THE IDETIFIERS IS STORED IN THE BMX ADO SCHEMA FILE ; PATIENT DFN=235 |
|
SCHEMA(NAME) | ; GIVEN SCHEMA NAME, RETURN THE IEN
|
|
EDIT | ; EDIT AN EXISTING ENTRY
; SIMILAR TO ABOVE EXCEPT THAT THE FIRST "^" PIECE OF THE DATA NODE IS THE IEN OF THE RECORD TO BE EDITIED ; NOTE THAT THERE IS NO '`' IN FRONT OF THE FIRST PIECE. IT IS A PURE INTEGER ; LAB TEST=175, PATIENT DFN=2, VISIT IEN=8040, PT'S GLUCOSE=276, ANORMAL="ABNORMAL" |
|
AA2 | ; ITERATE USING AA INDEX
; THIS SCHEMA IS ATTACHED TO THE VISIT FILE (9000010) ; IN THIS CASE THERE IS NO ATTRIBUTE TYPE SO THE FILTER PARAM HAS ONLY 2 PIECES "1|R" ; 235=PATIENT DFN ; R=RETURN DATA IN REVERSE CHRONOLOGICAL ORDER |
Name | Line Occurrences |
---|---|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: READ |
|
Function Call: READ |
|
Function Call: WRITE |
|
Function Call: READ |
|
Function Call: WRITE |
|
Function Call: READ |
|
Function Call: WRITE |
|
Function Call: READ |
|
Function Call: WRITE |
|
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^BMXADO("B" | SCHEMA+2 |
^TMP("BMX ADO" | NUM+7!, IX+7!, RIT+8!, SUB+9!, DINUM+8!, IXP+8!, AA+11!, AA2+9!, CIT+12!, ID+9! , JSTD+17!, HWSTD+8!, JMD+13!, JSUB+12!, JPAR+10!, ADD+24, ADD+25*, ADD+27, ADD+28!, DEL+10 , DEL+11*, DEL+13, DEL+14!, EDIT+7, EDIT+8*, EDIT+10, EDIT+11!, DELVAL+6, DELVAL+7*, DELVAL+9 , DELVAL+10! |
Name | Line Occurrences |
---|---|
$$SCHEMA | NUM+4, IX+4, RENT+5, SUB+5, DINUM+5, IXP+5, AA+8, AA2+6, CIT+9, ID+6 , JSTD+11, JSTD+12, HWSTD+3, HWSTD+4, JMD+2, JMD+3, JMD+4, JSUB+7, JSUB+8, JPAR+6 , JPAR+7, ADD+22, DEL+8, EDIT+5, DELVAL+4 |
DISP | NUM+6, IX+6, RIT+2, SUB+8, DINUM+7, IXP+7, AA+10, AA2+8, CIT+11, ID+8 , JSTD+16, HWSTD+7, JMD+12, JSUB+11, JPAR+9, ADD+26, DEL+12, EDIT+9, DELVAL+8 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
% | NUM+3~, NUM+6*, IX+3~, IX+6*, RENT+3~, RIT+2*, RIT+3, SUB+4~, SUB+8*, DINUM+4~ , DINUM+7*, IXP+4~, IXP+7*, AA+7~, AA+10*, AA2+5~, AA2+8*, CIT+8~, CIT+11*, ID+5~ , ID+8*, JSTD+10~, JSTD+16*, HWSTD+2~, HWSTD+7*, JMD+1~, JMD+12*, JSUB+6~, JSUB+11*, JPAR+5~ , JPAR+9*, ADD+20~, ADD+26*, ADD+29*, DEL+6~, DEL+12*, DEL+15*, EDIT+4~, EDIT+9*, EDIT+12* , DELVAL+3~, DELVAL+8*, DELVAL+11* |
DEL | DEL+6~, DEL+7*, DEL+11 |
DFN | ADD+20~, ADD+21*, ADD+25 |
DTIME | NUM+6, IX+6, RIT+2, SUB+8, DINUM+7, IXP+7, AA+10, AA2+8, CIT+11, ID+8 , JSTD+16, HWSTD+7, JMD+12, JSUB+11, JPAR+9, ADD+26, DEL+12, EDIT+9, DELVAL+8 |
I | DISP+1~, DISP+2*, DISP+3* |
IEN | SCHEMA+1~, SCHEMA+2*, SCHEMA+3 |
LSEED | RENT+3~, RENT+4*, RIT+6, RIT+7* |
NAME | SCHEMA~, SCHEMA+2 |
NODE | ADD+20~, ADD+24*, ADD+25, DEL+6~, DEL+10*, DEL+11, EDIT+4~, EDIT+7*, EDIT+8, DELVAL+3~ , DELVAL+6*, DELVAL+7 |
OUT | DISP~, DISP+3, NUM+3~, NUM+5, NUM+6, IX+3~, IX+5, IX+6, RENT+3~, RIT+1 , RIT+2, RIT+4, SUB+4~, SUB+7, SUB+8, DINUM+4~, DINUM+6, DINUM+7, IXP+4~, IXP+6 , IXP+7, AA+7~, AA+9, AA+10, AA2+5~, AA2+7, AA2+8, CIT+8~, CIT+10, CIT+11 , ID+5~, ID+7, ID+8, JSTD+10~, JSTD+15, JSTD+16, HWSTD+2~, HWSTD+6, HWSTD+7, JMD+1~ , JMD+11, JMD+12, JSUB+6~, JSUB+10, JSUB+11, JPAR+5~, JPAR+8, JPAR+9, ADD+20~, ADD+23 , ADD+26, ADD+27, ADD+29, DEL+6~, DEL+9, DEL+12, DEL+13, DEL+15, EDIT+4~, EDIT+6 , EDIT+9, EDIT+10, EDIT+12, DELVAL+3~, DELVAL+5, DELVAL+8, DELVAL+9, DELVAL+11 |
OUT( | ADD+29, DEL+15, EDIT+12, DELVAL+11 |
SEED | RENT+3~, RENT+4*, RIT, RIT+1, RIT+2*, RIT+3*, RIT+5*, RIT+6*, RIT+7 |
SIEN | NUM+3~, NUM+4*, NUM+5, IX+3~, IX+4*, IX+5, RENT+3~, RENT+5*, RIT+1, SUB+4~ , SUB+5*, DINUM+4~, DINUM+5*, DINUM+6, IXP+4~, IXP+5*, IXP+6, AA+7~, AA+8*, AA+9 , AA2+5~, AA2+6*, AA2+7, CIT+8~, CIT+9*, CIT+10, ID+5~, ID+6*, ID+7, ADD+20~ , ADD+22*, ADD+23, DEL+6~, DEL+8*, DEL+9, EDIT+4~, EDIT+5*, EDIT+6, DELVAL+3~, DELVAL+4* , DELVAL+5 |
SIEN1 | JSTD+10~, JSTD+12*, JSTD+15, HWSTD+2~, HWSTD+3*, HWSTD+6, JMD+1~, JMD+2*, JMD+11, JSUB+6~ , JSUB+7*, JSUB+10, JPAR+5~, JPAR+6*, JPAR+8 |
SIEN2 | JSTD+10~, JSTD+11*, JSTD+15, HWSTD+2~, HWSTD+4*, HWSTD+6, JMD+1~, JMD+3*, JSUB+6~, JSUB+8* , JSUB+10, JPAR+5~, JPAR+7*, JPAR+8 |
SIEN3 | JMD+1~, JMD+4*, JMD+7 |
U | RIT+4 |
VSTG | JMD+1~, JMD+5*, JMD+7*, JMD+11 |
X | DISP+1~, DISP+3*, RENT+3~, RIT+4*, RIT+5 |
Y | RENT+3~ |