- Timestamp:
- May 6, 2013, 12:41:16 PM (12 years ago)
- 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-0 3 6:09 PM1 C0XPT0 ; VEN/SMH - Get patient data and do something about it ;2013-05-06 9:47 AM 2 2 ;;1.1;FILEMAN TRIPLE STORE;; 3 3 ; (C) Sam Habiel 2013 … … 187 187 QUIT 188 188 ; 189 NP() ; New Person Entry 190 Q:$O(^VA(200,"B","PROVIDER,UNKNOWN SMART",0)) $O(^(0)) ; Quit if the entry exists 189 NP() ; 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 191 192 ; 192 193 N C0XFDA,C0XIEN,C0XERR,DIERR … … 202 203 Q C0XIEN(1) ;Provider IEN 203 204 ; 204 HL() ; Hospital Location Entry 205 HL() ; 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 ; 205 209 N C0XFDA,C0XIEN,C0XERR,DIERR 206 210 S C0XFDA(44,"?+1,",.01)="SMART PATIENT LOCATION" ; Name -
fmts/trunk/p/C0XPT4.m
r1621 r1622 1 C0XPT4 ; VEN/SMH - Encounter Processing;2013-05-0 3 5:11 PM1 C0XPT4 ; VEN/SMH - Encounter Processing;2013-05-06 9:42 AM 2 2 ;;1.0;FILEMAN TRIPLE STORE; 3 3 ; (c) 2013 Sam Habiel … … 17 17 . S STARTDATE=$$FMDATE(STARTDATE) 18 18 . W " ",STARTDATE 19 . D HISTENC(STARTDATE,DFN) ; HistoricalEncounter Private API19 . D ONEENC(STARTDATE,DFN) ; File One Encounter Private API 20 20 K ^TMP($J,"ENC") ; data location 21 21 QUIT … … 35 35 ; 36 36 ; 37 HISTENC(DATE,DFN,FTLOC,COMMENT) ; Private Proc; HistoricalEncounter Filing into the VISIT file37 ONEENC(DATE,DFN,FTLOC,COMMENT) ; Private Proc; One Encounter Filing into the VISIT file 38 38 ; Input: 39 39 ; - DATE: FM DATE of VISIT (Scalar) - Required 40 40 ; - DFN (Scalar) - Required 41 ; - FTLOC: Free Text Location - Optional. Defaults to SMART LOCATION42 ; - COMMENT: Free Text Comment - Optional. Defaults to Imported from Smart41 ; - FTLOC: (Scalar) Free Text Location - Optional. Defaults to SMART LOCATION 42 ; - COMMENT: (Scalar) Free Text Comment - Optional. Defaults to Imported from Smart 43 43 ; Output: 44 ; - Creates V file entries for the historicalencounter44 ; - Creates V file entries for encounter 45 45 ; 46 46 ; Handle required and optional variables... … … 61 61 S C0XDATA("ENCOUNTER",1,"HOS LOC")=$$HL^C0XPT0() 62 62 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 64 64 S C0XDATA("ENCOUNTER",1,"ENCOUNTER TYPE")="P" ; Primary 65 S C0XDATA("ENCOUNTER",1,"COMMENT")=COMMENT 65 66 S C0XDATA("PROVIDER",1,"NAME")=$$NP^C0XPT0() 66 67 ; Diangosis and procedure necessary so visit will show up in ^SDE. 68 ; We invent them here. 67 69 S C0XDATA("DX/PL",1,"DIAGNOSIS")=$O(^ICD9("BA","V70.3 ",0)) 68 S C0XDATA("PROCEDURE",1,"PROCEDURE")=$O(^ICPT("B","992 01",0))70 S C0XDATA("PROCEDURE",1,"PROCEDURE")=$O(^ICPT("B","99212",0)) 69 71 S C0XDATA("PROCEDURE",1,"QTY")=1 70 72 ; … … 72 74 N XQORMUTE S XQORMUTE=1 ; Unwinder: Shut the hell up. Don't execute disabled protocols rather than whining about them. 73 75 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 75 77 QUIT 76 78 ; … … 79 81 ; BE VERY CAREFUL USING THIS... 80 82 ; Walk through the C X-Ref for this patient 81 N I S I=9000010 ; Hit the VISIT file LAST as some xrefs in otherfiles point to it!83 N I S I=9000010 ; Hit the VISIT file LAST as V files point to it! 82 84 N DIK,DA 83 85 F S I=$O(^DIC(I)) Q:I'<9000011 D ; For each V File...
Note:
See TracChangeset
for help on using the changeset viewer.