Changeset 1679 for cprs/trunk/CPRS-Chart/Orders/fODBase.pas
- Timestamp:
- May 7, 2015, 12:34:29 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/Orders/fODBase.pas
r829 r1679 44 44 private 45 45 FDialog: string; 46 FDialogDisplayName: string; 46 47 FResponseList: TList; 47 48 FPrompts: TList; … … 99 100 const AnIValue, AnEValue: string); 100 101 property Dialog: string read FDialog write SetDialog; 102 property DialogDisplayName: string read FDialogDisplayName write FDialogDisplayName; 101 103 property DisplayGroup: Integer read FDisplayGroup write FDisplayGroup; 102 104 property CopyOrder: string read FCopyOrder write SetCopyOrder; … … 645 647 if CopyOrder <> '' then DupORIFN := CopyOrder; 646 648 //if {(CopyOrder <> '') or} (EditOrder <> '') then Exit; // only check new orders 647 with FResponseList do for i := 0 to Count - 1 do with TResponse(Items[i]) do 648 if (PromptID = 'ORDERABLE') or (PromptID = 'ADDITIVE') then 649 begin 650 OrderableIEN := IValue; 651 TheInstance := Instance; 652 PkgPart := ''; 653 if AFillerID = 'LR' then PkgPart := '^LR^' + IValueFor('SPECIMEN', TheInstance); 654 if (AFillerID = 'PSI') or (AFillerID = 'PSO') or (AFillerID = 'PSH') 655 then PkgPart := U + AFillerID + U + IValueFor('DRUG', TheInstance); 656 // was -- then PkgPart := '^PS^' + IValueFor('DRUG', TheInstance); 657 if AFillerID = 'PSIV' then 649 with FResponseList do 650 for i := 0 to FResponseList.Count - 1 do 658 651 begin 659 if PromptID = 'ORDERABLE' then PkgPart := '^PSIV^B;' + IValueFor('VOLUME', TheInstance); 660 if PromptID = 'ADDITIVE' then PkgPart := '^PSIV^A'; 652 with TResponse(Items[i]) do 653 begin 654 if (PromptID = 'ORDERABLE') or (PromptID = 'ADDITIVE') then 655 begin 656 OrderableIEN := IValue; 657 TheInstance := Instance; 658 PkgPart := ''; 659 if AFillerID = 'LR' then PkgPart := '^LR^' + IValueFor('SPECIMEN', TheInstance); 660 if (AFillerID = 'PSI') or (AFillerID = 'PSO') or (AFillerID = 'PSH') or (AFillerID = 'PSNV') 661 then PkgPart := U + AFillerID + U + IValueFor('DRUG', TheInstance); 662 // was -- then PkgPart := '^PS^' + IValueFor('DRUG', TheInstance); 663 if AFillerID = 'PSIV' then 664 begin 665 if PromptID = 'ORDERABLE' then PkgPart := '^PSIV^B;' + IValueFor('VOLUME', TheInstance); 666 if PromptID = 'ADDITIVE' then PkgPart := '^PSIV^A'; 667 end; 668 AList.Add(OrderableIEN + PkgPart); 669 end; 670 //AGP IV CHANGES 671 if (AFillerID = 'PSI') or (AFillerID = 'PSO') or (AFillerID = 'PSH') or (AFillerID = 'PSIV') or (AFillerID = 'PSNV') then 672 begin 673 IF PromptID = 'COMMENT' then continue; 674 Alist.Add(AFillerID + U + PromptID + U + InttoStr(Instance) + U + IValueFor(PromptID, Instance) + U + EValueFor(PromptID, Instance)); 675 end; 661 676 end; 662 AList.Add(OrderableIEN + PkgPart); 663 end; 677 end; 664 678 AStartDtTm := IValueFor('START', 1); 665 679 end; … … 1138 1152 ExpandOrderObjects(tmp, HasObjects); 1139 1153 FOrderContainsObjects := FOrderContainsObjects or HasObjects; 1154 1155 if frmODBase.FAbortOrder then 1156 begin 1157 SetTemplateDialogCanceled(FALSE); 1158 Exit; 1159 end; 1160 1140 1161 if IEN <> 0 then 1141 1162 begin … … 1155 1176 CheckBoilerplate4Fields(tmp, cptn); 1156 1177 List.Text := tmp; 1178 if WasTemplateDialogCanceled then frmODBase.FAbortOrder := True; 1179 1157 1180 end; 1158 1181 … … 1301 1324 {Caller needs to set pnlMessage.TabOrder} 1302 1325 begin 1326 //TDP - Added pnlMessage.Caption for screen reader readability 1327 pnlMessage.Caption := 'Informational Message.'; 1303 1328 memMessage.Lines.SetText(PChar(AMessage)); 1304 1329 //begin CQ: 2640 … … 1323 1348 FOrderAction := OrderAction; 1324 1349 FAbortOrder := False; 1350 SetTemplateDialogCanceled(False); //wat/jh CQ 20061 1325 1351 case OrderAction of 1326 1352 ORDER_NEW: {nothing}; … … 1468 1494 StatusText('Order Checking...'); 1469 1495 Responses.BuildOCItems(OIList, StartDtTm, FillerID); 1470 OrderChecksOnAccept(Responses.OrderChecks, FillerID, StartDtTm, OIList, DupORIFN );1496 OrderChecksOnAccept(Responses.OrderChecks, FillerID, StartDtTm, OIList, DupORIFN,'0'); 1471 1497 DupORIFN := ''; 1472 1498 StatusText(''); … … 1490 1516 begin 1491 1517 Result := True; 1518 IsDelayOrder := False; 1492 1519 Validate(ErrMsg); 1493 IsDelayOrder := False;1494 1520 if Length(ErrMsg) > 0 then 1495 1521 begin … … 1500 1526 if not AcceptOrderChecks then 1501 1527 begin 1528 //added code to shut CPRS down without access violations if the fOCAccept is open when timing out. 1529 if frmFrame.TimedOut then 1530 begin 1531 Result := False; 1532 Exit; 1533 end; 1502 1534 if AskAnotherOrder(DialogIEN) then 1503 1535 InitDialog // ClearDialogControls is in InitDialog … … 1541 1573 else CanSign := CH_SIGN_NA; 1542 1574 if NewOrder.Signature = OSS_NOT_REQUIRE then CanSign := CH_SIGN_NA; 1543 if NewOrder.EventPtr <> '' then IsDelayOrder := True; 1544 Changes.Add(CH_ORD, NewOrder.ID, NewOrder.Text, Responses.FViewName, CanSign,'',0, NewOrder.DGroupName, False,IsDelayOrder); 1575 if (NewOrder.EventPtr <> '') and (GetEventDefaultDlg(responses.FEventIFN) <> InttoStr(Responses.QuickOrder)) then 1576 IsDelayOrder := True; 1577 Changes.Add(CH_ORD, NewOrder.ID, NewOrder.Text, Responses.FViewName, CanSign,'',0, NewOrder.DGroupName, False, IsDelayOrder); 1545 1578 1546 1579 UBAGlobals.TargetOrderID := NewOrder.ID; … … 1711 1744 //self.Responses.Cancel := False; 1712 1745 if User.NoOrdering then Exit; 1713 if FAbortOrder then exit; 1746 if FAbortOrder then 1747 begin 1748 SetTemplateDialogCanceled(FALSE); 1749 exit; 1750 end; 1714 1751 if FOrderAction in [ORDER_EDIT, ORDER_COPY] then Exit; // don't invoke verify dialog 1715 1752 if FOrderAction = ORDER_QUICK then Exit; // should this be here??
Note:
See TracChangeset
for help on using the changeset viewer.