Changeset 829 for cprs/trunk/CPRS-Chart/Orders/fODLab.pas
- Timestamp:
- Jul 7, 2010, 4:31:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/Orders/fODLab.pas
r456 r829 6 6 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 7 7 Forms, Dialogs, StdCtrls, ORCtrls, ORfn, fODBase, ExtCtrls, ComCtrls, uConst, 8 ORDtTm, Buttons, Menus ;8 ORDtTm, Buttons, Menus, VA508AccessibilityManager; 9 9 10 10 type … … 106 106 FEvtDivision: integer; 107 107 procedure ReadServerVariables; 108 procedure DisplayChangedOrders(ACollType: string); 108 109 public 109 110 procedure SetupDialog(OrderAction: Integer; const ID: string); override; … … 240 241 EvtDivision := StrToIntDef(GetEventDiv1(IntToStr(Self.EvtID)),0); 241 242 if EvtDelayLoc>0 then 242 AList.Assign(ODForLab(EvtDelayLoc,EvtDivision))243 FastAssign(ODForLab(EvtDelayLoc, EvtDivision), AList) 243 244 else 244 AList.Assign(ODForLab(Encounter.Location,EvtDivision));245 FastAssign(ODForLab(Encounter.Location, EvtDivision), AList); 245 246 end else 246 AList.Assign(ODForLab(Encounter.Location)); // ODForLab returns TStrings with defaults247 FastAssign(ODForLab(Encounter.Location), AList); // ODForLab returns TStrings with defaults 247 248 CtrlInits.LoadDefaults(AList); 248 249 InitDialog; … … 457 458 OneSamp := TStringList.Create; 458 459 try 459 OneSamp.Assign(GetOneCollSamp(StrToInt(LRFSAMP)));460 FastAssign(GetOneCollSamp(StrToInt(LRFSAMP)), OneSamp); 460 461 FillCollSampList(OneSamp, CollSampList.Count); 461 462 finally … … 651 652 begin 652 653 if SpecimenList.Count = 0 then LoadSpecimens(SpecimenList) ; 653 AComboBox.Items.Assign(SpecimenList);654 FastAssign(SpecimenList, AComboBox.Items); 654 655 AComboBox.Items.Add('0^Other...'); 655 656 with QuickOrderResponses do tmpResp := FindResponseByName('SPECIMEN' ,1); … … 902 903 Days, MsgTxt: Double; 903 904 x: string; 905 ACollType: string; 904 906 const 905 907 TX_NO_TIME = 'Collection Time is required.' ; … … 1126 1128 end; 1127 1129 end; 1130 1131 if (AnErrMsg <> '') or (Self.EvtID > 0) then exit; 1132 1133 // add check and display for auto-change from LC to WC - v27.1 - CQ #10226 1134 ACollType := Responses.FindResponseByName('COLLECT', 1).EValue; 1135 if ((ACollType = 'LC') or (ACollType = 'I')) then DisplayChangedOrders(ACollType); 1136 end; 1137 1138 procedure TfrmODLab.DisplayChangedOrders(ACollType: string); 1139 var 1140 AStartDate, ASchedule, ADuration: string; 1141 ChangedOrdersList, AList: TStringlist; 1142 i, j, k: integer; 1143 begin 1144 ChangedOrdersList := TStringList.Create; 1145 try 1146 AStartDate := Responses.FindResponseByName('START', 1).IValue; 1147 ASchedule := Responses.FindResponseByName('SCHEDULE', 1).IValue; 1148 if txtDays.Enabled then ADuration := Responses.FindResponseByName('DAYS', 1).EValue else ADuration := ''; 1149 CheckForChangeFromLCtoWCOnAccept(ChangedOrdersList, Encounter.Location, AStartDate, ACollType, ASchedule, ADuration); 1150 if ChangedOrdersList.Text <> '' then 1151 begin 1152 AList := TStringList.Create; 1153 try 1154 AList.Text := Responses.OrderText; 1155 with ChangedOrdersList do 1156 begin 1157 Insert(5, 'Order :' + #9 + AList[0]); 1158 k := Length(ChangedOrdersList[5]); 1159 i := 0; 1160 if AList.Count > 1 then 1161 for j := 1 to AList.Count - 1 do 1162 begin 1163 Insert(5 + j, StringOfChar(' ', 9) + #9 + AList[j]); 1164 k := HigherOf(k, Length(ChangedOrdersList[5 + j])); 1165 i := j; 1166 end; 1167 Insert(5 + i + 1, StringOfChar('-', k + 4)); 1168 end; 1169 ReportBox(ChangedOrdersList, 'Changed Orders', TRUE); 1170 finally 1171 AList.Free; 1172 end; 1173 end; 1174 finally 1175 ChangedOrdersList.Free; 1176 end; 1128 1177 end; 1129 1178
Note:
See TracChangeset
for help on using the changeset viewer.