Changeset 1622 for fmts


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

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

Location:
fmts/trunk/p
Files:
2 edited

Legend:

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

    r1621 r1622  
    1 C0XPT0 ; VEN/SMH - Get patient data and do something about it ;2013-05-03  6:09 PM
     1C0XPT0 ; VEN/SMH - Get patient data and do something about it ;2013-05-06  9:47 AM
    22 ;;1.1;FILEMAN TRIPLE STORE;;
    33 ; (C) Sam Habiel 2013
     
    187187 QUIT
    188188 ;
    189 NP() ; New Person Entry
    190         Q:$O(^VA(200,"B","PROVIDER,UNKNOWN SMART",0)) $O(^(0)) ; Quit if the entry exists
     189NP() ; Private ; New Person Entry
     190        N NAME S NAME="PROVIDER,UNKNOWN SMART" ; Constant
     191        Q:$O(^VA(200,"B",NAME,0)) $O(^(0)) ; Quit if the entry exists with entry
    191192        ;
    192193        N C0XFDA,C0XIEN,C0XERR,DIERR
     
    202203        Q C0XIEN(1) ;Provider IEN
    203204        ;
    204 HL() ; Hospital Location Entry
     205HL() ; Private; Hospital Location Entry
     206        N NAME S NAME="SMART PATIENT LOCATION" ; Constant
     207        Q:$O(^SC("B",NAME,0)) $O(^(0)) ; Quit if the entry exists with the entry
     208        ;
    205209        N C0XFDA,C0XIEN,C0XERR,DIERR
    206210        S C0XFDA(44,"?+1,",.01)="SMART PATIENT LOCATION" ; Name
  • 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.