Ignore:
Timestamp:
Dec 4, 2009, 12:11:15 AM (15 years ago)
Author:
George Lilly
Message:

revised back to 6/30/08 version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMETH1.m

    r613 r623  
    1 PXRMETH1        ; SLC/PJH - Reminder Extract History ;09/07/2007
    2         ;;2.0;CLINICAL REMINDERS;**4,6**;Feb 04, 2005;Build 123
    3         ;
    4 BLDLIST(EDIEN)  ;Build workfile
    5         ;EDIEN is the extract definition IEN.
    6         N IND,FMTSTR,PLIST
    7         K ^TMP("PXRMETH",$J)
    8         S FMTSTR=$$LMFMTSTR^PXRMTEXT(.VALMDDF,"RLL")
    9         ;Build list of extract summaries in period order
    10         I PXRMVIEW="P" D LIST1(EDIEN,"PXRMETH",FMTSTR)
    11         ;Build list of extract summaries in date order
    12         I PXRMVIEW="D" D LIST2(EDIEN,"PXRMETH",FMTSTR)
    13         Q
    14         ;
    15 FMT(NUMBER,NAME,EDATE,XDATE,AUTO,FMTSTR,NL,OUTPUT)      ;Format
    16         N TAUTO,TDATE,TEMP,TNAME,TSOURCE
    17         S TEMP=NUMBER_U_NAME_U
    18         S TDATE=$$FMTE^XLFDT(EDATE,"5Z")
    19         S TEMP=TEMP_$$LJ^XLFSTR(TDATE,20," ")
    20         S TDATE=XDATE I TDATE S TDATE=$$FMTE^XLFDT(TDATE,"5Z")
    21         S TEMP=TEMP_" "_$$LJ^XLFSTR(TDATE,22," ")
    22         S TAUTO=AUTO
    23         S TEMP=TEMP_TAUTO
    24         D COLFMT^PXRMTEXT(FMTSTR,TEMP," ",.NL,.OUTPUT)
    25         Q
    26         ;
    27 HELP(CALL)      ;General help text routine.
    28         N HTEXT
    29         I CALL=1 D
    30         .S HTEXT(1)="Select DE to delete an extract.\\"
    31         .S HTEXT(2)="Select ES to view the details of an extract or run a compliance"
    32         .S HTEXT(3)="report for the extract.\\Select MT to transmit extract details to the AAC.\\"
    33         .S HTEXT(4)="Select TH to view the transmission history for an extract."
    34         ;
    35         I CALL=3 D
    36         .S HTEXT(1)="Select Y to send the results of the Extract to the National Austin database."
    37         ;
    38         I CALL=4 D
    39         .S HTEXT(4)="Select Y to overwrite the previous Extract stored in the National Austin Database."
    40         D HELP^PXRMEUT(.HTEXT)
    41         Q
    42         ;
    43 LIST1(EDIEN,NODE,FMTSTR)        ;Build a list of extract summaries for a parameter.
    44         N AUTO,EDATE,HL7ID,HL7SUB,IND,JND,NAME,NL,NUM,OUTPUT
    45         N PERIOD,STR,XDATE,YEAR
    46         ;Build list of extract summaries in reverse date order.
    47         S YEAR="9999",(NUM,VALMCNT)=0
    48         F  S YEAR=$O(^PXRMXT(810.3,"D",EDIEN,YEAR),-1) Q:YEAR=""  D
    49         .S PERIOD="99"
    50         .F  S PERIOD=$O(^PXRMXT(810.3,"D",EDIEN,YEAR,PERIOD),-1) Q:PERIOD=""  D
    51         ..S IND=""
    52         ..F  S IND=$O(^PXRMXT(810.3,"D",EDIEN,YEAR,PERIOD,IND),-1) Q:IND=""  D
    53         ...S NAME=$P($G(^PXRMXT(810.3,IND,0)),U)
    54         ...S EDATE=$P($G(^PXRMXT(810.3,IND,0)),U,6)
    55         ...S AUTO=$P($G(^PXRMXT(810.3,IND,4)),U,5)
    56         ...S AUTO=$S(AUTO="A":"Y",1:"N")
    57         ...S HL7ID=$O(^PXRMXT(810.3,IND,5,"B",""),-1),XDATE="",HL7SUB=""
    58         ...I HL7ID S HL7SUB=$O(^PXRMXT(810.3,IND,5,"B",HL7ID,""))
    59         ...I HL7SUB S XDATE=$P($G(^PXRMXT(810.3,IND,5,HL7SUB,0)),U,2)
    60         ...I 'XDATE S XDATE="Not Transmitted"
    61         ...S NUM=NUM+1
    62         ...D FMT(NUM,NAME,EDATE,XDATE,AUTO,FMTSTR,.NL,.OUTPUT)
    63         ...F JND=1:1:NL D
    64         ....S VALMCNT=VALMCNT+1,^TMP(NODE,$J,VALMCNT,0)=OUTPUT(JND)
    65         ....S ^TMP(NODE,$J,"IDX",VALMCNT,NUM)=""
    66         ....S ^TMP(NODE,$J,"SEL",NUM)=IND
    67         Q
    68         ;
    69 LIST2(EDIEN,NODE,FMTSTR)        ;Build a list of extract summaries for a parameter.
    70         N AUTO,EDATE,HL7ID,HL7SUB,IND,JND,NAME,NL,NUM,OUTPUT
    71         N PERIOD,STR,XDATE,YEAR
    72         ;Build list of extract summaries in reverse date order.
    73         S EDATE="",(NUM,VALMCNT)=0
    74         F  S EDATE=$O(^PXRMXT(810.3,"C",EDIEN,EDATE),-1) Q:'EDATE  D
    75         .S IND=""
    76         .F  S IND=$O(^PXRMXT(810.3,"C",EDIEN,EDATE,IND)) Q:'IND  D
    77         ..S NAME=$P($G(^PXRMXT(810.3,IND,0)),U,1)
    78         ..S AUTO=$P($G(^PXRMXT(810.3,IND,4)),U,5)
    79         ..S AUTO=$S(AUTO="A":"Y",1:"N")
    80         ..S HL7ID=$O(^PXRMXT(810.3,IND,5,"B",""),-1),XDATE="",HL7SUB=""
    81         ..I HL7ID S HL7SUB=$O(^PXRMXT(810.3,IND,5,"B",HL7ID,""))
    82         ..I HL7SUB S XDATE=$P($G(^PXRMXT(810.3,IND,5,HL7SUB,0)),U,2)
    83         ..I 'XDATE S XDATE="Not Transmitted"
    84         ..S NUM=NUM+1
    85         ..D FMT(NUM,NAME,EDATE,XDATE,AUTO,FMTSTR,.NL,.OUTPUT)
    86         ..F JND=1:1:NL D
    87         ...S VALMCNT=VALMCNT+1,^TMP(NODE,$J,VALMCNT,0)=OUTPUT(JND)
    88         ...S ^TMP(NODE,$J,"IDX",VALMCNT,NUM)=""
    89         ...S ^TMP(NODE,$J,"SEL",NUM)=IND
    90         Q
    91         ;
     1PXRMETH1 ; SLC/PJH - Reminder Extract History ;07/24/2006
     2 ;;2.0;CLINICAL REMINDERS;**4**;Feb 04, 2005;Build 21
     3 ;
     4BLDLIST(IEN) ;Build workfile
     5 N IND,PLIST
     6 K ^TMP("PXRMETH",$J)
     7 ;Build list of extract summaries in period order
     8 I PXRMVIEW="P" D LIST1(.PLIST,.IEN)
     9 ;Build list of extract summaries in date order
     10 I PXRMVIEW="D" D LIST2(.PLIST,.IEN)
     11 ;Move into list array
     12 M ^TMP("PXRMETH",$J)=PLIST
     13 S VALMCNT=PLIST("VALMCNT")
     14 ;Allow selection by item
     15 F IND=1:1:VALMCNT D
     16 .S ^TMP("PXRMETH",$J,"IDX",IND,IND)=IEN(IND)
     17 Q
     18 ;
     19HELP(CALL) ;General help text routine.
     20 N HTEXT
     21 I CALL=1 D
     22 .S HTEXT(1)="Select ES to view the details of an extract or run a compliance"
     23 .S HTEXT(2)="report for the extract. Select MT to transmit extract details to the AAC."
     24 .S HTEXT(3)="Select TH to view the transmission history for an extract."
     25 ;
     26 I CALL=3 D
     27 .S HTEXT(1)="Select Y to send the results of the Extract to the National Austin database."
     28 ;
     29 I CALL=4 D
     30 .S HTEXT(4)="Select Y to overwrite the previous Extract stored in the National Austin Database."
     31 D HELP^PXRMEUT(.HTEXT)
     32 Q
     33 ;
     34LIST1(LIST,IEN) ;Build a list of extract summaries for a parameter.
     35 N AUTO,EDATE,HL7ID,HL7SUB,IND,NAME,PERIOD,XDATE,YEAR
     36 ;Build list of extract summaries in reverse date order.
     37 S YEAR="9999",VALMCNT=0
     38 F  S YEAR=$O(^PXRMXT(810.3,"D",IEN,YEAR),-1) Q:YEAR=""  D
     39 .S PERIOD="99"
     40 .F  S PERIOD=$O(^PXRMXT(810.3,"D",IEN,YEAR,PERIOD),-1) Q:PERIOD=""  D
     41 ..S IND=""
     42 ..F  S IND=$O(^PXRMXT(810.3,"D",IEN,YEAR,PERIOD,IND),-1) Q:IND=""  D
     43 ...S NAME=$P($G(^PXRMXT(810.3,IND,0)),U)
     44 ...S EDATE=$P($G(^PXRMXT(810.3,IND,0)),U,6)
     45 ...S AUTO=$P($G(^PXRMXT(810.3,IND,4)),U,5)
     46 ...S AUTO=$S(AUTO="A":"Y",1:"N")
     47 ...S HL7ID=$O(^PXRMXT(810.3,IND,5,"B",""),-1),XDATE="",HL7SUB=""
     48 ...I HL7ID S HL7SUB=$O(^PXRMXT(810.3,IND,5,"B",HL7ID,""))
     49 ...I HL7SUB S XDATE=$P($G(^PXRMXT(810.3,IND,5,HL7SUB,0)),U,2)
     50 ...I 'XDATE S XDATE="Not Transmitted"
     51 ...S VALMCNT=VALMCNT+1
     52 ...S LIST(VALMCNT,0)=$$FRE(VALMCNT,NAME,EDATE,XDATE,AUTO)
     53 ...S IEN(VALMCNT)=IND
     54 S LIST("VALMCNT")=VALMCNT
     55 Q
     56 ;
     57LIST2(LIST,IEN) ;Build a list of extract summaries for a parameter.
     58 N AUTO,EDATE,HL7ID,HL7SUB,IND,NAME,PERIOD,XDATE,YEAR
     59 ;Build list of extract summaries in reverse date order.
     60 S EDATE="",VALMCNT=0
     61 F  S EDATE=$O(^PXRMXT(810.3,"C",IEN,EDATE),-1) Q:'EDATE  D
     62 .S IND=""
     63 .F  S IND=$O(^PXRMXT(810.3,"C",IEN,EDATE,IND)) Q:'IND  D
     64 ..S NAME=$P($G(^PXRMXT(810.3,IND,0)),U)
     65 ..S AUTO=$P($G(^PXRMXT(810.3,IND,4)),U,5)
     66 ..S AUTO=$S(AUTO="A":"Y",1:"N")
     67 ..S HL7ID=$O(^PXRMXT(810.3,IND,5,"B",""),-1),XDATE="",HL7SUB=""
     68 ..I HL7ID S HL7SUB=$O(^PXRMXT(810.3,IND,5,"B",HL7ID,""))
     69 ..I HL7SUB S XDATE=$P($G(^PXRMXT(810.3,IND,5,HL7SUB,0)),U,2)
     70 ..I 'XDATE S XDATE="Not Transmitted"
     71 ..S VALMCNT=VALMCNT+1
     72 ..S LIST(VALMCNT,0)=$$FRE(VALMCNT,NAME,EDATE,XDATE,AUTO)
     73 ..S IEN(VALMCNT)=IND
     74 S LIST("VALMCNT")=VALMCNT
     75 Q
     76 ;
     77FRE(NUMBER,NAME,EDATE,XDATE,AUTO) ;Format
     78 N TAUTO,TDATE,TEMP,TNAME,TSOURCE
     79 S TEMP=$$RJ^XLFSTR(NUMBER,5," ")
     80 S TNAME=$E(NAME,1,27)
     81 S TEMP=TEMP_" "_$$LJ^XLFSTR(TNAME,27," ")
     82 S TDATE=$$FMTE^XLFDT(EDATE,"5Z")
     83 S TEMP=TEMP_" "_$$LJ^XLFSTR(TDATE,20," ")
     84 S TDATE=XDATE I TDATE S TDATE=$$FMTE^XLFDT(TDATE,"5Z")
     85 S TEMP=TEMP_" "_$$LJ^XLFSTR(TDATE,22," ")
     86 S TAUTO=AUTO
     87 S TEMP=TEMP_TAUTO
     88 Q TEMP
Note: See TracChangeset for help on using the changeset viewer.