Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: DGPTAPA4

DGPTAPA4.m

Go to the documentation of this file.
  1. DGPTAPA4 ;ALB/MTC - PTF ARCHIVE HEADER ; 12-04-92
  1. ;;5.3;Registration;;Aug 13, 1993
  1. ;
  1. ;
  1. MKHEAD ;-- write header
  1. N SEQ,OSEQ,REF,TXT
  1. S OSEQ=$G(^DGP(45.62,DGTMP,100,0)) Q:OSEQ']""
  1. S SEQ=$P(OSEQ,U,3),REF="^DGP(45.62,"_DGTMP_",100)",SEQ=SEQ+1
  1. F I=1:1 S TXT=$P($T(HEADTXT+I),";;",2) Q:TXT="END" S @REF@(SEQ,0)="$"_TXT,SEQ=SEQ+1
  1. ;-- update
  1. S $P(^DGP(45.62,DGTMP,100,0),U,3,4)=SEQ_U_SEQ
  1. Q
  1. ;
  1. HEADTXT ;-- This is the header text describing the format of the records.
  1. ;;Each archived PTF record may contain the following records in the
  1. ;;Archive File. These records correspond to the <101>, <401>, <501>
  1. ;;and <701> screens in PTF. Each field in the record is delimited
  1. ;;by a "^". All records begin with the original PTF record number
  1. ;;followed by the record type. For example:
  1. ;; <PTF #>^"501"^...
  1. ;; <PTF #>^"401"^...
  1. ;; All comments contained in the Archive file will have a "$" in the
  1. ;;first column.
  1. ;; All records are terminated by a <CR><LF>.
  1. ;;The following description will describe the "pieces" of each record
  1. ;;archived. A piece is a section deliminated by a "^".
  1. ;;The <101> and <701> data will be contained in the following record:
  1. ;; Piece # Data
  1. ;; 1 PTF Record number
  1. ;; 2 Patient Name
  1. ;; 3 Admission Date
  1. ;; 4 Discharge Date
  1. ;; 5 Discharge Specialty
  1. ;; 6 Type of Disposition
  1. ;; 7 Discharge Status
  1. ;; 8 Outpatient Treatment
  1. ;; 9 ASIH Days
  1. ;; 10 C&P Status
  1. ;; 11 VA Auspices
  1. ;; 12 Income
  1. ;; 13-22 ICD Codes
  1. ;; 23 Suicide Indicator
  1. ;; 24 Legionnaire's Disease Indicator
  1. ;; 25 Substance Abuse
  1. ;; 26 Psychiatry Classification Severity
  1. ;; 27 Current Functional Assessment
  1. ;; 28 Highest Level Psych Classification
  1. ;;The <401> record will be contained in the following record format.
  1. ;;These records may not be present for the episode of care described
  1. ;;by this PTF record. In addition, for each <401> there may be an
  1. ;;associated <401P>.
  1. ;;<401> Record.
  1. ;; Piece # Data
  1. ;; 1 PTF Record Number
  1. ;; 2 "401"
  1. ;; 3 Sequence Number (for multiple <401>s)
  1. ;; 4 Surgery Date
  1. ;; 5 Surgical Specialty
  1. ;; 6 Category of Chief Surgeon
  1. ;; 7 Category of First Assistant
  1. ;; 8 Principal Anesthetic
  1. ;; 9 Source of Payment
  1. ;; 10-14 ICD Codes
  1. ;; 15 Kidney Source
  1. ;;<401P> Record.
  1. ;; Piece # Data
  1. ;; 1 PTF Record Number
  1. ;; 2 "401P"
  1. ;; 3 Sequence Number (will match a <401> record)
  1. ;; 4-9 Procedure Codes
  1. ;;There will be at least one <501> record for the episode of care
  1. ;;described by this PTF record.
  1. ;;<501> Record.
  1. ;; Piece # Data
  1. ;; 1 PTF Record Number
  1. ;; 2 "501"
  1. ;; 3 Sequence Number
  1. ;; 4 Movement Date
  1. ;; 5 Treated for SC Condition
  1. ;; 6 Leave Days
  1. ;; 7 Pass Days
  1. ;; 8 Losing Specialty
  1. ;; 9-18 ICD Codes
  1. ;; 19 Suicide Indicator
  1. ;; 20 Legionnaire's Disease Indicator
  1. ;; 21 Substance Abuse
  1. ;; 22 Psychiatry Classification Severity
  1. ;; 23 Current Functional Assessment
  1. ;; 24 Highest Level Psych Classification
  1. ;;The <535> record is present only for ward specialty movements
  1. ;;for the patient if a transfer from one ward to another resulted
  1. ;;in a specialty change.
  1. ;;<535> Record.
  1. ;; Piece # Data
  1. ;; 1 PTF Record Number
  1. ;; 2 "535"
  1. ;; 3 Sequence Number
  1. ;; 4 Movement Date
  1. ;; 5 Losing Ward Specialty
  1. ;; 6 Leave Days
  1. ;; 7 Pass Days
  1. ;; 8 Losing Ward
  1. ;;The <601> will not be present for all episodes of care.
  1. ;;<601> Record.
  1. ;; Piece # Data
  1. ;; 1 PTF Record Number
  1. ;; 2 "601"
  1. ;; 3 Sequence Number
  1. ;; 4 Procedure Date
  1. ;; 5 Specialty
  1. ;; 6 Dialysis Type
  1. ;; 7 Number of Treatments
  1. ;; 8-12 Procedure Codes
  1. ;;END