Changeset 460 for cprs/branches/foia-cprs/CPRS-Chart/rTIU.pas
- Timestamp:
- Jul 6, 2008, 8:20:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/foia-cprs/CPRS-Chart/rTIU.pas
r459 r460 4 4 5 5 uses SysUtils, Classes, ORNet, ORFn, rCore, uCore, uConst, TRPCB, uTIU; 6 7 type 8 TPatchInstalled = record 9 PatchInstalled: boolean; 10 PatchChecked: boolean; 11 end; 6 12 7 13 { Progress Note Titles } … … 10 16 procedure ResetNoteTitles; 11 17 function IsConsultTitle(TitleIEN: Integer): Boolean; 18 function IsPRFTitle(TitleIEN: Integer): Boolean; 12 19 function IsClinProcTitle(TitleIEN: Integer): Boolean; 13 20 procedure ListNoteTitlesShort(Dest: TStrings); … … 20 27 function AskCosignerForNotes: Boolean; 21 28 function AskCosignerForDocument(ADocument: Integer; AnAuthor: Int64): Boolean; 22 function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64 ): Boolean;29 function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64; ADate: TFMDateTime): Boolean; 23 30 function AskSubjectForNotes: Boolean; 24 function CanCosign(ATitle, ADocType: integer; AUser: Int64 ): Boolean;31 function CanCosign(ATitle, ADocType: integer; AUser: Int64; ADate: TFMDateTime): Boolean; 25 32 function CanChangeCosigner(IEN: integer): boolean; 26 33 procedure DefaultCosigner(var IEN: Int64; var Name: string); … … 93 100 function UserInactive(EIN: String): boolean; 94 101 102 //Miscellaneous 103 function TIUPatch175Installed: boolean; 104 95 105 const 96 106 CLS_PROGRESS_NOTES = 3; 97 107 98 108 implementation 109 110 uses rMisc; 99 111 100 112 var … … 103 115 uNoteTitles: TNoteTitles; 104 116 uTIUPrefs: TTIUPrefs; 117 uPatch175Installed: TPatchInstalled; 105 118 106 119 … … 153 166 if TitleIEN <= 0 then Exit; 154 167 Result := sCallV('TIU IS THIS A CONSULT?', [TitleIEN]) = '1'; 168 end; 169 170 function IsPRFTitle(TitleIEN: Integer): Boolean; 171 begin 172 Result := False; 173 if TitleIEN <= 0 then Exit; 174 Result := sCallV('TIU ISPRF', [TitleIEN]) = '1'; 155 175 end; 156 176 … … 238 258 end; 239 259 240 function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64 ): Boolean;260 function AskCosignerForTitle(ATitle: integer; AnAuthor: Int64; ADate: TFMDateTime): Boolean; 241 261 { returns TRUE if a cosignature is required for a document title and author } 242 262 begin 243 Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, 0, AnAuthor]), U, 1) = '1'; 263 if TIUPatch175Installed then 264 Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, 0, AnAuthor, ADate]), U, 1) = '1' 265 else 266 Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, 0, AnAuthor]), U, 1) = '1'; 244 267 end; 245 268 … … 258 281 end; 259 282 260 function CanCosign(ATitle, ADocType: integer; AUser: Int64 ): Boolean;283 function CanCosign(ATitle, ADocType: integer; AUser: Int64; ADate: TFMDateTime): Boolean; 261 284 begin 262 285 if ATitle > 0 then ADocType := 0; 263 Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, ADocType, AUser]), U, 1) <> '1'; 286 if TIUPatch175Installed and (ADocType = 0) then 287 Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, ADocType, AUser, ADate]), U, 1) <> '1' 288 else 289 Result := Piece(sCallV('TIU REQUIRES COSIGNATURE', [ATitle, ADocType, AUser]), U, 1) <> '1'; 264 290 end; 265 291 … … 1016 1042 function IDNotesInstalled: boolean; 1017 1043 begin 1018 Result := True; 1044 Result := True; // old patch check no longer called 1019 1045 end; 1020 1046 … … 1123 1149 end; 1124 1150 1151 function TIUPatch175Installed: boolean; 1152 begin 1153 with uPatch175Installed do 1154 if not PatchChecked then 1155 begin 1156 PatchInstalled := ServerHasPatch('TIU*1.0*175'); 1157 PatchChecked := True; 1158 end; 1159 Result := uPatch175Installed.PatchInstalled; 1160 end; 1161 1125 1162 function NoteHasText(NoteIEN: integer): boolean; 1126 1163 begin 1127 1164 Result := (StrToIntDef(sCallV('ORWTIU CHKTXT', [NoteIEN]), 0) > 0); 1128 1165 end; 1166 1129 1167 1130 1168 initialization
Note:
See TracChangeset
for help on using the changeset viewer.