Changeset 1586 for ccr/trunk/p/C0CCPT.m


Ignore:
Timestamp:
Oct 30, 2012, 1:11:02 PM (12 years ago)
Author:
Sam Habiel
Message:

Changed license to AGPL. Some clean-up for XINDEX

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/C0CCPT.m

    r1544 r1586  
    11C0CCPT  ;;BSL;RETURN CPT DATA;
    2         ;;1.2;C0C;;May 11, 2012;Build 47
    3         ;Sequence Managers Software GPL;;;;;Build 2
    4         ;Copied into C0C namespace from SQMCPT with permission from
    5         ;Brian Lord - and with our thanks. gpl 01/20/2010
     2        ;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50
     3        ; (C) George Lilly 2010
     4        ;
     5        ; This program is free software: you can redistribute it and/or modify
     6        ; it under the terms of the GNU Affero General Public License as
     7        ; published by the Free Software Foundation, either version 3 of the
     8        ; License, or (at your option) any later version.
     9        ;
     10        ; This program is distributed in the hope that it will be useful,
     11        ; but WITHOUT ANY WARRANTY; without even the implied warranty of
     12        ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13        ; GNU Affero General Public License for more details.
     14        ;
     15        ; You should have received a copy of the GNU Affero General Public License
     16        ; along with this program.  If not, see <http://www.gnu.org/licenses/>.
     17        ;
    618ENTRY(DFN,STDT,ENDDT,TXT)       ;BUILD TOTAL ARRAY OF ALL IEN'S FOR TIU NOTES
    719        ;DFN=PATIENT IEN
     
    1022        ;TXT=INCLUDE TEXT FROM ENCOUNTER NOTE
    1123        ;THAT FALL INSIDE DATA RANGE. IF NO STDT OR ENDDT ASSUME
    12                ;ALL INCLUSIVE IN THAT DIRECTION
    13                ;LIST OF TIU DOCS IN ^TIU(8925,"ACLPT",3,DFN)
    14                ;BUILD INTO NOTE(Y)=""
    15                S U="^",X=""
    16                F  S X=$O(^TIU(8925,"ACLPT",3,DFN,X)) Q:X=""  D
    17                . S Y=""
    18                . F  S Y=$O(^TIU(8925,"ACLPT",3,DFN,X,Y)) Q:Y=""  D
    19                .. S NOTE(Y)=""
    20                ;NOW DELETE ANY NOTES THAT DON'T FALL INTO DATE RANGE
    21                ;GET DATE OF NOTE
     24        ;ALL INCLUSIVE IN THAT DIRECTION
     25        ;LIST OF TIU DOCS IN ^TIU(8925,"ACLPT",3,DFN)
     26        ;BUILD INTO NOTE(Y)=""
     27        S U="^",X=""
     28        F  S X=$O(^TIU(8925,"ACLPT",3,DFN,X)) Q:X=""  D
     29        . S Y=""
     30        . F  S Y=$O(^TIU(8925,"ACLPT",3,DFN,X,Y)) Q:Y=""  D
     31        .. S NOTE(Y)=""
     32        ;NOW DELETE ANY NOTES THAT DON'T FALL INTO DATE RANGE
     33        ;GET DATE OF NOTE
    2234        ;RUT 3120109 Changing DATE in FILMAN's FORMAT
    23         ;;OHUM/RUT 3111228 Date Range for Notes
    24                ;S STDT=^TMP("C0CCCR","TIULIMIT") D NOW^%DTC S ENDDT=X
     35        ;OHUM/RUT 3111228 Date Range for Notes
     36        ;S STDT=^TMP("C0CCCR","TIULIMIT") D NOW^%DTC S ENDDT=X
    2537        N FLAGS1,FLAGS2
    2638        S FLAGS1=$P(^C0CPARM(1,2),"^",1) S STDT=$$HTOF^C0CVALID(FLAGS1)
    2739        S FLAGS2=$P(^C0CPARM(1,2),"^",2) S ENDDT=$$HTOF^C0CVALID(FLAGS2)
    2840        ;S STDT=^TMP("C0CCCR","TIULIMIT"),ENDDT=^TMP("C0CCCR","TIUSTART")
    29                ;;OHUM/RUT
     41        ;OHUM/RUT
    3042        ;RUT
    31                S Z=""
    32                F  S Z=$O(NOTE(Z)) Q:Z=""  D
    33                . S DT=$P(^TIU(8925,Z,0),U,7)
    34                . I $G(STDT)]"" D
    35                .. I STDT>DT S NOTE(Z)="D"  ;SET NOTE TO BE DELETED
    36                . I $G(ENDDT)]"" D
    37                .. I ENDDT<DT S NOTE(Z)="D"
    38                . I NOTE(Z)="D" K NOTE(Z)
     43        S Z=""
     44        F  S Z=$O(NOTE(Z)) Q:Z=""  D
     45        . S DT=$P(^TIU(8925,Z,0),U,7)
     46        . I $G(STDT)]"" D
     47        .. I STDT>DT S NOTE(Z)="D"  ;SET NOTE TO BE DELETED
     48        . I $G(ENDDT)]"" D
     49        .. I ENDDT<DT S NOTE(Z)="D"
     50        . I NOTE(Z)="D" K NOTE(Z)
    3951        D VISIT
    40                Q
     52        Q
    4153VISIT     ;GET VISIT INFO FOR A GIVEN NOTE. BUILD INTO RETURN ARRAY .VISIT
    4254        S ILST=1,X0="",X12="",VISIT="",LST="",X811=""
Note: See TracChangeset for help on using the changeset viewer.