Changeset 1622 for fmts/trunk/p/C0XPT4.m


Ignore:
Timestamp:
May 6, 2013, 12:41:16 PM (11 years ago)
Author:
Sam Habiel
Message:

Mostly comment changes; minor changes here and there. Encounters now work correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fmts/trunk/p/C0XPT4.m

    r1621 r1622  
    1 C0XPT4 ; VEN/SMH - Encounter Processing;2013-05-03  5:11 PM
     1C0XPT4 ; VEN/SMH - Encounter Processing;2013-05-06  9:42 AM
    22 ;;1.0;FILEMAN TRIPLE STORE;
    33 ; (c) 2013 Sam Habiel
     
    1717        . S STARTDATE=$$FMDATE(STARTDATE)
    1818        . W " ",STARTDATE
    19         . D HISTENC(STARTDATE,DFN) ; Historical Encounter Private API
     19        . D ONEENC(STARTDATE,DFN) ; File One Encounter Private API
    2020        K ^TMP($J,"ENC") ; data location
    2121        QUIT
     
    3535        ;
    3636        ;
    37 HISTENC(DATE,DFN,FTLOC,COMMENT) ; Private Proc; Historical Encounter Filing into the VISIT file
     37ONEENC(DATE,DFN,FTLOC,COMMENT) ; Private Proc; One Encounter Filing into the VISIT file
    3838        ; Input:
    3939        ; - DATE: FM DATE of VISIT (Scalar) - Required
    4040        ; - DFN (Scalar) - Required
    41         ; - FTLOC: Free Text Location - Optional. Defaults to SMART LOCATION
    42         ; - COMMENT: Free Text Comment - Optional. Defaults to Imported from Smart
     41        ; - FTLOC: (Scalar) Free Text Location - Optional. Defaults to SMART LOCATION
     42        ; - COMMENT: (Scalar) Free Text Comment - Optional. Defaults to Imported from Smart
    4343        ; Output:
    44         ; - Creates V file entries for the historical encounter
     44        ; - Creates V file entries for encounter
    4545        ;
    4646        ; Handle required and optional variables...
     
    6161        S C0XDATA("ENCOUNTER",1,"HOS LOC")=$$HL^C0XPT0()
    6262        S C0XDATA("ENCOUNTER",1,"SERVICE CATEGORY")="A" ; Ambulatory
    63         S C0XDATA("ENCOUNTER",1,"OUTSIDE LOCATION")="FROM THE WIDE WORLD"
     63        S C0XDATA("ENCOUNTER",1,"OUTSIDE LOCATION")=FTLOC
    6464        S C0XDATA("ENCOUNTER",1,"ENCOUNTER TYPE")="P" ; Primary
     65        S C0XDATA("ENCOUNTER",1,"COMMENT")=COMMENT
    6566        S C0XDATA("PROVIDER",1,"NAME")=$$NP^C0XPT0()
    6667        ; Diangosis and procedure necessary so visit will show up in ^SDE.
     68        ; We invent them here.
    6769        S C0XDATA("DX/PL",1,"DIAGNOSIS")=$O(^ICD9("BA","V70.3 ",0))
    68         S C0XDATA("PROCEDURE",1,"PROCEDURE")=$O(^ICPT("B","99201",0))
     70        S C0XDATA("PROCEDURE",1,"PROCEDURE")=$O(^ICPT("B","99212",0))
    6971        S C0XDATA("PROCEDURE",1,"QTY")=1
    7072        ;
     
    7274        N XQORMUTE S XQORMUTE=1 ; Unwinder: Shut the hell up. Don't execute disabled protocols rather than whining about them.
    7375        N OK S OK=$$DATA2PCE^PXAPI($NA(C0XDATA),PKG,SRC,.C0XVISIT,,,.C0XERR)
    74         I OK<1 S $EC=",U1,"
     76        I OK<1 S $EC=",U1," ; Invalid value is -1
    7577        QUIT
    7678        ;
     
    7981        ; BE VERY CAREFUL USING THIS...
    8082        ; Walk through the C X-Ref for this patient
    81         N I S I=9000010  ; Hit the VISIT file LAST as some xrefs in other files point to it!
     83        N I S I=9000010  ; Hit the VISIT file LAST as V files point to it!
    8284        N DIK,DA
    8385        F  S I=$O(^DIC(I)) Q:I'<9000011  D  ; For each V File...
Note: See TracChangeset for help on using the changeset viewer.