Changeset 460 for cprs/branches/foia-cprs/CPRS-Chart/Orders/fOrders.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/Orders/fOrders.pas
r459 r460 89 89 sptVert: TSplitter; 90 90 mnuViewExpired: TMenuItem; 91 mnuViewInformation: TMenuItem; 92 mnuViewDemo: TMenuItem; 93 mnuViewVisits: TMenuItem; 94 mnuViewPrimaryCare: TMenuItem; 95 mnuViewMyHealtheVet: TMenuItem; 96 mnuInsurance: TMenuItem; 97 mnuViewFlags: TMenuItem; 98 mnuViewReminders: TMenuItem; 99 mnuViewRemoteData: TMenuItem; 100 mnuViewPostings: TMenuItem; 101 mnuOptimizeFields: TMenuItem; 91 102 procedure mnuChartTabClick(Sender: TObject); 92 103 procedure FormCreate(Sender: TObject); … … 146 157 procedure hdrOrdersMouseDown(Sender: TObject; Button: TMouseButton; 147 158 Shift: TShiftState; X, Y: Integer); 159 procedure ViewInfo(Sender: TObject); 160 procedure mnuViewInformationClick(Sender: TObject); 161 procedure mnuOptimizeFieldsClick(Sender: TObject); 162 procedure hdrOrdersSectionClick(HeaderControl: THeaderControl; 163 Section: THeaderSection); 164 procedure sptHorzMoved(Sender: TObject); 148 165 private 149 166 { Private declarations } … … 188 205 procedure UseDefaultSort; 189 206 procedure SynchListToOrders; 207 // procedure ActivateDeactiveRenew; 190 208 procedure ValidateSelected(const AnAction, WarningMsg, WarningTitle: string); 191 209 procedure ViewAlertedOrders(OrderIEN: string; Status: integer; DispGrp: string; … … 196 214 function MeasureColumnHeight(AnOrder: TOrder; Index: Integer; Column: integer):integer; 197 215 function GetPlainText(AnOrder: TOrder; index: integer):string; 216 function PatientStatusChanged: boolean; 198 217 procedure UMEventOccur(var Message: TMessage); message UM_EVENTOCCUR; 218 function CheckOrderStatus: boolean; 199 219 public 200 220 procedure setSectionWidths; //CQ6170 … … 229 249 property EvtColWidth: integer read FEvtColWidth write FEvtColWidth; 230 250 property DontCheck: boolean read FDontCheck write FDontCheck; 231 property ParentComplexOrderID: string read FParentComplexOrderID write FParentComplexOrderID; 251 property ParentComplexOrderID: string read FParentComplexOrderID write FParentComplexOrderID; 232 252 end; 233 253 … … 247 267 fOMNavA, rCore, fOCSession, fOrdersPrint, fOrdersTS, fEffectDate, fODActive, fODChild, 248 268 fOrdersCopy, fOMVerify, fODAuto, rODBase, uODBase, rMeds,fODValidateAction, fMeds, uInit, fBALocalDiagnoses, 249 fODConsult;269 fODConsult, fClinicWardMeds, fActivateDeactivate; 250 270 251 271 {$R *.DFM} … … 970 990 if ((TOrder(Items.Objects[i]).DGroupName = 'Inpt. Meds') or 971 991 (TOrder(Items.Objects[i]).DGroupName = 'Out. Meds') or 972 (TOrder(Items.Objects[i]).DGroupName = 'IV Fluids')) then 992 (TOrder(Items.Objects[i]).DGroupName = 'Clin. Orders') or 993 (TOrder(Items.Objects[i]).DGroupName = 'Infusion')) then 973 994 begin 974 995 tmpList.Add(''); … … 993 1014 ReportBox(tmpList, 'Order Details - ' + BigOrderID, True); 994 1015 end; 1016 StatusText(''); 1017 if (frmFrame.TimedOut) or (frmFrame.CCOWDrivedChange) then Exit; //code added to correct access violation on timeout 995 1018 Selected[i] := False; 996 StatusText(''); 997 end; 1019 end; 998 1020 finally 999 1021 tmpList.Free; … … 1324 1346 7: result := ChartRev; 1325 1347 8: result := NameOfStatus(Status); 1326 9: 1327 begin1328 result := MixedCase(Anorder.OrderLocName);1329 if (Index > 0) and (result = TOrder(lstOrders.Items.Objects[Index - 1]).OrderLocName) then result := '';1330 end;1348 9: result := MixedCase(Anorder.OrderLocName); 1349 //begin AGP change 26.52 display all location for orders. 1350 //result := MixedCase(Anorder.OrderLocName); 1351 //if (Index > 0) and (result = TOrder(lstOrders.Items.Objects[Index - 1]).OrderLocName) then result := ''; 1352 //end; 1331 1353 end; 1332 1354 end; … … 1435 1457 NextIndex: Integer; 1436 1458 begin 1437 1459 if PatientStatusChanged then exit; 1438 1460 if BILLING_AWARE then //CQ5114 1439 1461 fODConsult.displayDXCode := ''; //CQ5114 … … 1534 1556 BadList := TStringList.Create; 1535 1557 CheckedList := TStringList.Create; 1536 with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then 1537 begin 1538 AnOrder := TOrder(Items.Objects[i]); 1539 //AGP Change 25.34 to fix problem with renewing inpatient meds from an outpatient location 1540 if (AnAction = 'RN') and (AnOrder.Status=6) and (AnOrder.DGroupName = 'Inpt. Meds') and (Patient.inpatient) and (IsClinicLoc(Encounter.Location)) then 1541 begin 1542 Selected[i] := False; 1543 MessageDlg('You can not renew inpatient medication order on a clinic location for selected inpatient.', mtWarning, [mbOK], 0); 1544 end; 1545 if (AnAction = 'RN') or (AnAction = 'EV') then // or (AnAction = 'RW') then 1546 begin 1547 if not IsValidSchedule(AnOrder.ID) then 1548 begin 1549 if (AnAction = 'RN') then 1550 ShowMessage('The order contains invalid schedule and can not be renewed.') 1551 else if (AnAction = 'EV') then 1552 ShowMessage('The order contains invalid schedule and can not be changed to event delayed order.'); 1553 //else if (AnAction = 'RW') then 1554 // ShowMessage('The order contains invalid schedule and can not be copied.); 1558 try 1559 with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then 1560 begin 1561 AnOrder := TOrder(Items.Objects[i]); 1562 if (AnAction = 'RN') and (AnOrder.Status=6) and (AnOrder.DGroupName = 'Inpt. Meds') and (Patient.inpatient) and (IsClinicLoc(Encounter.Location)) then 1563 begin 1564 Selected[i] := False; 1565 MessageDlg('You cannot renew inpatient medication order on a clinic location for selected inpatient.', mtWarning, [mbOK], 0); 1566 end; 1567 if ((AnAction = 'RN') or (AnAction = 'EV')) and (AnOrder.EnteredInError = 0) then //AGP Changes PSI-04053 1568 begin 1569 if not IsValidSchedule(AnOrder.ID) then 1570 begin 1571 if (AnAction = 'RN') then 1572 ShowMessage('The order contains invalid schedule and can not be renewed.') 1573 else if (AnAction = 'EV') then 1574 ShowMessage('The order contains invalid schedule and can not be changed to event delayed order.'); 1575 1576 Selected[i] := False; 1577 Continue; 1578 end; 1579 end; 1580 //AGP CHANGE ORDER ENTERED IN ERROR TO ALLOW SIGNATURE AND VERIFY ACTIONS 26.23 1581 if ((AnOrder.EnteredInError = 1) and ((AnOrder.Status = 1) or (AnOrder.Status = 13))) and ((AnAction <> 'ES') and (AnAction <> 'VR')) then 1582 begin 1583 InfoBox(AnOrder.Text + WarningMsg + 'This order has been mark as Entered in error.', WarningTitle, MB_OK); 1584 Selected[i] := False; 1585 Continue; 1586 end; 1587 if ((AnAction <> OA_RELEASE) and (AnOrder.EnteredInError = 0)) or (((AnOrder.EnteredInError = 1) and ((AnOrder.Status = 1) or (AnOrder.Status = 13))) and 1588 (AnAction = 'ES')) then 1589 ValidateOrderAction(AnOrder.ID, AnAction, ErrMsg) 1590 //AGP END Changes 1591 else ErrMsg := ''; 1592 if (Length(ErrMsg)>0) and (Pos('COMPLEX-PSI',ErrMsg)<1) then 1593 begin 1594 InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK); 1555 1595 Selected[i] := False; 1556 1596 Continue; 1557 1597 end; 1558 end; 1559 if AnAction <> OA_RELEASE then ValidateOrderAction(AnOrder.ID, AnAction, ErrMsg) 1560 else ErrMsg := ''; 1561 if (Length(ErrMsg)>0) and (Pos('COMPLEX-PSI',ErrMsg)<1) then 1562 begin 1563 InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK); 1564 Selected[i] := False; 1565 Continue; 1566 end; 1567 if (Length(ErrMsg)>0) and IsFirstDoseNowOrder(AnOrder.ID) and (AnAction <> 'RL') then 1568 begin 1569 InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK); 1570 Selected[i] := False; 1571 Continue; 1572 end; 1573 if (Length(ErrMsg)>0) and ( (AnAction = OA_CHGEVT) or (AnAction = OA_EDREL) ) then 1574 begin 1575 InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK); 1576 Selected[i] := False; 1577 Continue; 1578 end; 1579 AParentID := ''; 1580 IsValidActionOnComplexOrder(AnOrder.ID, AnAction,TListBox(lstOrders),CheckedList,ErrMsg, AParentID); 1581 TOrder(Items.Objects[i]).ParentID := AParentID; 1582 if (Length(ErrMsg)=0) and (AnAction=OA_EDREL) then 1598 if (Length(ErrMsg)>0) and IsFirstDoseNowOrder(AnOrder.ID) and (AnAction <> 'RL') then 1599 begin 1600 InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK); 1601 Selected[i] := False; 1602 Continue; 1603 end; 1604 if (Length(ErrMsg)>0) and ( (AnAction = OA_CHGEVT) or (AnAction = OA_EDREL) ) then 1605 begin 1606 InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK); 1607 Selected[i] := False; 1608 Continue; 1609 end; 1610 AParentID := ''; 1611 IsValidActionOnComplexOrder(AnOrder.ID, AnAction,TListBox(lstOrders),CheckedList,ErrMsg, AParentID); 1612 TOrder(Items.Objects[i]).ParentID := AParentID; 1613 if (Length(ErrMsg)=0) and (AnAction=OA_EDREL) then 1614 begin 1615 if (AnOrder.Signature = 2) and (not VerbTelPolicyOrder(AnOrder.ID)) then 1616 begin 1617 ErrMsg := 'Need to be signed first.'; 1618 Selected[i] := False; 1619 end; 1620 end; 1621 1622 if (AnAction = OA_CHGEVT) or (AnAction = OA_EDREL) then 1623 begin 1624 if Length(ErrMsg)>0 then 1625 begin 1626 Selected[i] := False; 1627 Badlist.Add(AnOrder.Text + '^' + ErrMsg); 1628 end 1629 else 1630 GoodList.Add(AnOrder.Text); 1631 end; 1632 1633 if (Length(ErrMsg) > 0) and (AnAction <> OA_CHGEVT) and (AnAction <> OA_EDREL) then 1634 begin 1635 if Pos('COMPLEX-PSI',ErrMsg)>0 then ErrMsg := TX_COMPLEX; 1636 InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK); 1637 Selected[i] := False; 1638 end; 1639 1640 if Selected[i] and (not OrderIsLocked(AnOrder.ID, AnAction)) then Selected[i] := False; 1641 1642 end; //with 1643 1644 if ((AnAction = OA_CHGEVT) or (AnAction = OA_EDREL)) then 1583 1645 begin 1584 if (AnOrder.Signature = 2) and (not VerbTelPolicyOrder(AnOrder.ID)) then 1585 begin 1586 ErrMsg := 'Need to be signed first.'; 1587 Selected[i] := False; 1588 end; 1646 if (BadList.Count = 1) and (GoodList.Count < 1 ) then 1647 InfoBox(Piece(BadList[0],'^',1) + WarningMsg + Piece(BadList[0],'^',2), WarningTitle, MB_OK); 1648 if ((BadList.Count >= 1) and (GoodList.Count >= 1)) or ( BadList.Count > 1 )then 1649 DisplayOrdersForAction(BadList,GoodList,AnAction); 1589 1650 end; 1590 1591 if (AnAction = OA_CHGEVT) or (AnAction = OA_EDREL) then 1592 begin 1593 if Length(ErrMsg)>0 then 1594 begin 1595 Selected[i] := False; 1596 Badlist.Add(AnOrder.Text + '^' + ErrMsg); 1597 end 1598 else 1599 GoodList.Add(AnOrder.Text); 1600 end; 1601 1602 if (Length(ErrMsg) > 0) and (AnAction <> OA_CHGEVT) and (AnAction <> OA_EDREL) then 1603 begin 1604 if Pos('COMPLEX-PSI',ErrMsg)>0 then ErrMsg := TX_COMPLEX; 1605 InfoBox(AnOrder.Text + WarningMsg + ErrMsg, WarningTitle, MB_OK); 1606 Selected[i] := False; 1607 end; 1608 1609 if Selected[i] and (not OrderIsLocked(AnOrder.ID, AnAction)) then Selected[i] := False; 1610 1611 end; //with 1612 1613 if ((AnAction = OA_CHGEVT) or (AnAction = OA_EDREL)) then 1614 begin 1615 if (BadList.Count = 1) and (GoodList.Count < 1 ) then 1616 InfoBox(Piece(BadList[0],'^',1) + WarningMsg + Piece(BadList[0],'^',2), WarningTitle, MB_OK); 1617 if ((BadList.Count >= 1) and (GoodList.Count >= 1)) or ( BadList.Count > 1 )then 1618 DisplayOrdersForAction(BadList,GoodList,AnAction); 1619 end; 1651 finally 1652 GoodList.Free; 1653 BadList.Free; 1654 CheckedList.Free; 1655 end; 1620 1656 end; 1621 1657 … … 1682 1718 SelectedList := TList.Create; 1683 1719 try 1684 ValidateSelected(OA_DC, TX_NO_DC, TC_NO_DC); // validate DC action on each order 1720 //if CheckOrderStatus = True then Exit; 1721 ValidateSelected(OA_DC, TX_NO_DC, TC_NO_DC); // validate DC action on each order 1722 //ActivateDeactiveRenew; AGP 26.53 TURN OFF UNTIL FINAL DECISION CAN BE MADE 1685 1723 MakeSelectedList(SelectedList); // build list of orders that remain 1686 1724 // updating the Changes object happens in ExecuteDCOrders, based on individual order … … 1753 1791 begin 1754 1792 inherited; 1755 if not EncounterPresentEDO then Exit; 1793 if not EncounterPresentEDO then Exit; 1756 1794 if NoneSelected(TX_NOSEL) then Exit; 1757 1795 if not AuthorizedUser then Exit; … … 1764 1802 SelectedList := TList.Create; 1765 1803 try 1804 if CheckOrderStatus = True then Exit; 1766 1805 ValidateSelected(OA_CHGEVT, TX_NO_CV, TC_NO_CV); // validate Change Event action on each order 1767 1806 MakeSelectedList(SelectedList); // build list of orders that remain … … 1799 1838 SelectedList := TList.Create; 1800 1839 try 1840 if CheckOrderStatus = True then Exit; 1801 1841 ValidateSelected(OA_HOLD, TX_NO_HOLD, TC_NO_HOLD); // validate hold action on each order 1802 1842 MakeSelectedList(SelectedList); // build list of orders that remain … … 1824 1864 SelectedList := TList.Create; 1825 1865 try 1866 if CheckOrderStatus = True then Exit; 1826 1867 ValidateSelected(OA_UNHOLD, TX_NO_UNHOLD, TC_NO_UNHOLD); // validate release hold action 1827 1868 MakeSelectedList(SelectedList); // build list of selected orders … … 1850 1891 SelectedList := TList.Create; 1851 1892 try 1893 if CheckOrderStatus = True then Exit; 1852 1894 ValidateSelected(OA_RENEW, TX_NO_RENEW, TC_NO_RENEW); // validate renew action for each 1853 1895 MakeSelectedList(SelectedList); // build list of orders that remain … … 2026 2068 try 2027 2069 if NoneSelected(TX_NOSEL) then Exit; 2070 if CheckOrderStatus = True then Exit; 2028 2071 ValidateSelected(OA_CHANGE, TX_NO_CHANGE, TC_NO_CHANGE); 2029 2072 if (FCurrentView.EventDelay.PtEventIFN>0) and … … 2067 2110 if NoneSelected(TX_NOSEL) then Exit; 2068 2111 NewOrderCreated := False; 2112 if CheckOrderStatus = True then Exit; 2069 2113 ValidateSelected(OA_COPY, TX_NO_COPY, TC_NO_COPY); 2070 2114 if (FCurrentView.EventDelay.PtEventIFN>0) and (PtEvtCompleted(FCurrentView.EventDelay.PtEventIFN, FCurrentView.EventDelay.EventName)) then … … 2269 2313 UBACore.CompleteUnsignedBillingInfo(rpcGetUnsignedOrdersBillingData(OrderListSCEI) ); 2270 2314 end; 2271 2315 2272 2316 {billing Aware} 2273 2317 ExecuteReleaseOrderChecks(SelectedList); // call order checking … … 2279 2323 if Active and (FollowUp = NF_ORDER_REQUIRES_ELEC_SIGNATURE) then 2280 2324 UnsignedOrderAlertFollowup(Piece(RecordID, U, 2)); 2281 UpdateExpiringMedAlerts(Patient.DFN); 2282 UpdateUnverifiedMedAlerts(Patient.DFN); 2283 UpdateUnverifiedOrderAlerts(Patient.DFN); 2325 if Active then 2326 begin 2327 UpdateExpiringMedAlerts(Patient.DFN); 2328 UpdateUnverifiedMedAlerts(Patient.DFN); 2329 UpdateUnverifiedOrderAlerts(Patient.DFN); 2330 end; 2284 2331 if not uInit.TimedOut then 2285 2332 begin … … 2370 2417 NF_DNR_EXPIRING : 2371 2418 ViewAlertedOrders('', STS_EXPIRING, '', False, True, 'All Services, Expiring'); 2372 NF_MEDICATIONS_EXPIRING : 2419 NF_MEDICATIONS_EXPIRING_INPT : 2420 begin 2421 ViewAlertedOrders('', STS_EXPIRING, 'PHARMACY', False, True, 'Medications, Expiring'); 2422 end; 2423 NF_MEDICATIONS_EXPIRING_OUTPT : 2373 2424 begin 2374 2425 ViewAlertedOrders('', STS_EXPIRING, 'PHARMACY', False, True, 'Medications, Expiring'); … … 2509 2560 if (ALocation > 0) and (ALocation <> Encounter.Location) then 2510 2561 begin 2511 if InfoBox(TX_NEW_LOC1 + AName + TX_NEW_LOC2, TC_NEW_LOC, MB_YESNO) = IDYES 2512 then Encounter.Location := ALocation; 2562 //gary 2563 Encounter.Location := frmClinicWardMeds.ClinicOrWardLocation(Alocation); 2564 // if InfoBox(TX_NEW_LOC1 + AName + TX_NEW_LOC2, TC_NEW_LOC, MB_YESNO) = IDYES 2565 // then Encounter.Location := ALocation; 2513 2566 end; 2514 2567 if Encounter.Location = 0 … … 3045 3098 inherited SetFontSize( FontSize ); 3046 3099 RedrawOrderList; 3100 mnuOptimizeFieldsClick(self); 3101 lstSheets.Repaint; 3102 lstWrite.Repaint; 3103 btnDelayedOrder.Repaint; 3047 3104 end; 3048 3105 … … 3050 3107 begin 3051 3108 inherited; 3109 if PatientStatusChanged then exit; 3052 3110 //frmFrame.UpdatePtInfoOnRefresh; 3053 3111 end; … … 3056 3114 begin 3057 3115 inherited; 3116 if PatientStatusChanged then exit; 3058 3117 //frmFrame.UpdatePtInfoOnRefresh; 3059 3118 end; … … 3062 3121 begin 3063 3122 inherited; 3123 if PatientStatusChanged then exit; 3064 3124 //frmFrame.UpdatePtInfoOnRefresh; 3065 3125 end; … … 3068 3128 begin 3069 3129 inherited; 3130 if PatientStatusChanged then exit; 3070 3131 //frmFrame.UpdatePtInfoOnRefresh; 3071 3132 end; … … 3186 3247 var 3187 3248 i: integer; 3188 totalSectionsWidth : integer;3249 totalSectionsWidth, originalwidth: integer; 3189 3250 begin 3190 3251 inherited; 3191 3252 //CQ6170 3192 3253 totalSectionsWidth := getTotalSectionsWidth; 3193 3194 if totalSectionsWidth > lstOrders.Width - 5 then 3195 begin 3196 for i := 0 to hdrOrders.Sections.Count-1 do 3197 begin 3198 hdrOrders.Sections[i].Width := origWidths[i]; 3199 lstOrders.Invalidate; 3200 end; 3201 end; 3254 if totalSectionsWidth > lstOrders.Width - 5 then 3255 begin 3256 originalwidth := 0; 3257 for i := 0 to hdrOrders.Sections.Count - 1 do 3258 originalwidth := originalwidth + origWidths[i]; 3259 if originalwidth < totalSectionsWidth then 3260 begin 3261 for i := 0 to hdrOrders.Sections.Count - 1 do 3262 hdrOrders.Sections[i].Width := origWidths[i]; 3263 lstOrders.Invalidate; 3264 end; 3265 end; 3202 3266 //end CQ6170 3203 3267 end; … … 3209 3273 end; 3210 3274 3275 function TfrmOrders.PatientStatusChanged: boolean; 3276 const 3277 3278 msgTxt1 = 'Patient status was changed from '; 3279 msgTxt2 = 'CPRS needs to refresh patient information to display patient latest record.'; 3280 //GE CQ9537 - Change message text 3281 msgTxt3 = 'Patient has been admitted. '; 3282 msgTxt4 = CRLF + 'You will be prompted to sign your orders. Any new orders subsequently' + 3283 CRLF +'entered and signed will be directed to the inpatient staff.'; 3284 var 3285 PtSelect: TPtSelect; 3286 IsInpatientNow: boolean; 3287 ptSts: string; 3288 begin 3289 result := False; 3290 SelectPatient(Patient.DFN, PtSelect); 3291 IsInpatientNow := Length(PtSelect.Location) > 0; 3292 if Patient.Inpatient <> IsInpatientNow then 3293 begin 3294 if (not Patient.Inpatient) then //GE CQ9537 - Change message text 3295 MessageDlg(msgTxt3 + msgTxt4, mtWarning, [mbOK], 0) 3296 else 3297 begin 3298 if Patient.Inpatient then ptSts := 'Inpatient to Outpatient.'; 3299 MessageDlg(msgTxt1 + ptSts + #13#10#13 + msgTxt2, mtWarning, [mbOK], 0); 3300 end; 3301 frmFrame.mnuFileRefreshClick(Application); 3302 Result := True; 3303 end; 3304 end; 3305 3306 function TfrmOrders.CheckOrderStatus: boolean; 3307 var 3308 i: integer; 3309 AnOrder: TOrder; 3310 begin 3311 Result := False; 3312 with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then 3313 begin 3314 AnOrder := TOrder(Items.Objects[i]); 3315 if AnORder.Status <> GetOrderStatus(AnOrder.ID) then 3316 begin 3317 MessageDlg('The Order status has changed.' + #13#10#13 + 'CPRS needs to refresh patient information to display the correct order status', mtWarning, [mbOK], 0); 3318 frmFrame.mnuFileRefreshClick(Application); 3319 Result := True; 3320 EXIT; 3321 end; 3322 end; 3323 end; 3324 3325 (*procedure TfrmOrders.ActivateDeactiveRenew; 3326 var 3327 i: Integer; 3328 AnOrder: TOrder; 3329 tmpArr: TStringList; 3330 begin 3331 tmpArr := TStringList.Create; 3332 with lstOrders do for i := 0 to Items.Count - 1 do if Selected[i] then 3333 begin 3334 AnOrder := TOrder(Items.Objects[i]); 3335 if AnOrder.Status = 5 then tmpArr.Add(AnOrder.ID); 3336 end; 3337 if tmpArr <> nil then frmActivateDeactive.fActivateDeactive(tmpArr); 3338 end; *) 3339 3340 procedure TfrmOrders.ViewInfo(Sender: TObject); 3341 begin 3342 inherited; 3343 frmFrame.ViewInfo(Sender); 3344 end; 3345 3346 procedure TfrmOrders.mnuViewInformationClick(Sender: TObject); 3347 begin 3348 inherited; 3349 mnuViewDemo.Enabled := frmFrame.pnlPatient.Enabled; 3350 mnuViewVisits.Enabled := frmFrame.pnlVisit.Enabled; 3351 mnuViewPrimaryCare.Enabled := frmFrame.pnlPrimaryCare.Enabled; 3352 mnuViewMyHealtheVet.Enabled := not (Copy(frmFrame.laMHV.Hint, 1, 2) = 'No'); 3353 mnuInsurance.Enabled := not (Copy(frmFrame.laVAA2.Hint, 1, 2) = 'No'); 3354 mnuViewFlags.Enabled := frmFrame.lblFlag.Enabled; 3355 mnuViewRemoteData.Enabled := frmFrame.lblCirn.Enabled; 3356 mnuViewReminders.Enabled := frmFrame.pnlReminders.Enabled; 3357 mnuViewPostings.Enabled := frmFrame.pnlPostings.Enabled; 3358 end; 3359 3360 procedure TfrmOrders.mnuOptimizeFieldsClick(Sender: TObject); 3361 var 3362 totalSectionsWidth, unitvalue: integer; 3363 begin 3364 totalSectionsWidth := pnlRight.Width - 3; 3365 if totalSectionsWidth < 16 then exit; 3366 unitvalue := round(totalSectionsWidth / 16); 3367 with hdrOrders do 3368 begin 3369 Sections[1].Width := unitvalue; 3370 Sections[2].Width := pnlRight.Width - (unitvalue * 10) - 5; 3371 Sections[3].Width := unitvalue * 2; 3372 Sections[4].Width := unitvalue * 2; 3373 Sections[5].Width := unitvalue; 3374 Sections[6].Width := unitvalue; 3375 Sections[7].Width := unitvalue; 3376 Sections[8].Width := unitvalue; 3377 Sections[9].Width := unitvalue; 3378 end; 3379 hdrOrdersSectionResize(hdrOrders, hdrOrders.Sections[0]); 3380 hdrOrders.Repaint; 3381 end; 3382 3383 procedure TfrmOrders.hdrOrdersSectionClick(HeaderControl: THeaderControl; 3384 Section: THeaderSection); 3385 begin 3386 inherited; 3387 //if Section = hdrOrders.Sections[1] then 3388 mnuOptimizeFieldsClick(self); 3389 end; 3390 3391 procedure TfrmOrders.sptHorzMoved(Sender: TObject); 3392 begin 3393 inherited; 3394 mnuOptimizeFieldsClick(self); 3395 end; 3396 3211 3397 end. 3212 3398
Note:
See TracChangeset
for help on using the changeset viewer.