Changeset 460 for cprs/branches/foia-cprs/CPRS-Chart/Orders/rOrders.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/rOrders.pas
r459 r460 38 38 ParentID : string; 39 39 LinkObject: TObject; 40 EnteredInError: Integer; //AGP Changes 26.12 PSI-04-053 40 41 procedure Assign(Source: TOrder); 41 42 procedure Clear; … … 604 605 DGroupSeq := SeqOfDGroup(DGroup); 605 606 DGroupName := TopNameOfDGroup(DGroup); 607 //AGP Changes 26.15 PSI-04-063 608 if (pos('Entered in error',Text)>0) then AnOrder.EnteredInError := 1 609 else AnOrder.EnteredInError := 0; 606 610 //if DGroupName = 'Non-VA Meds' then Text := 'Non-VA ' + Text; 607 611 end; … … 680 684 with RPCBrokerV do for i := 1 to Results.Count - 1 do // if orders found (skip 0 element) 681 685 begin 682 if (Piece(RPCBrokerV.Results[i], U, 1) = '0') or (Piece(RPCBrokerV.Results[i], U, 1) = '') then Continue; 683 if (DelimCount(Results[i],U) = 2) then Continue; 686 if (Piece(RPCBrokerV.Results[i], U, 1) = '0') or (Piece(RPCBrokerV.Results[i], U, 1) = '') then Continue; 687 if (DelimCount(Results[i],U) = 2) then Continue; 684 688 AnOrder := TOrder.Create; 685 689 with AnOrder do … … 1126 1130 var 1127 1131 DelayEvent, x, TheOrder: string; 1128 Idx, PickupIdx, ForIMOResponses: integer;1132 Idx, tmpOrderGroup, PickupIdx, ForIMOResponses: integer; 1129 1133 IfUDGrp: Boolean; 1130 1134 IfUDGrpForQO: Boolean; 1135 temp: string; 1131 1136 begin 1132 1137 ForIMOResponses := 0; 1138 tmpOrderGroup := 0; 1139 temp := ''; 1133 1140 if ForIMO then ForIMOResponses := 1; 1134 1141 PickupIdx := 0; … … 1139 1146 begin 1140 1147 Delete(TheOrder,1,1); 1141 if CheckOrderGroup(TheOrder)=1 then IfUDGrp := True else IfUDGrp := False; 1148 tmpOrderGroup := CheckOrderGroup(TheOrder); 1149 if tmpOrderGroup = 1 then IfUDGrp := True else IfUDGrp := False; 1142 1150 end; 1143 1151 if (not IfUDGrp) and (AnEvent.EventType in ['A','T']) then 1144 1152 IfUDGrp := True; 1145 1153 //FLDS=DFN^LOC^ORNP^INPT^SEX^AGE^EVENT^SC%^^^Key Variables 1154 if (Patient.Inpatient = true) and (tmpOrderGroup = 2) then temp := '0'; 1155 if temp <> '0' then temp := BoolChars[Patient.Inpatient]; 1146 1156 with AnEvent do 1147 1157 begin … … 1451 1461 1452 1462 with RPCBrokerV do 1453 begin 1454 ClearParameters := True; 1455 RemoteProcedure := 'ORWDXR RENEW'; 1456 Param[0].PType := literal; 1457 Param[0].Value := AnOrder.ID; 1458 Param[1].PType := literal; 1459 Param[1].Value := Patient.DFN; 1460 Param[2].PType := literal; 1461 Param[2].Value := IntToStr(Encounter.Provider); 1462 Param[3].PType := literal; 1463 Param[3].Value := IntToStr(Encounter.Location); 1464 Param[4].PType := list; 1465 1466 for i := 0 to tmplst.Count - 1 do 1467 Param[4].Mult[IntToStr(i+1)] := tmplst[i]; 1468 1469 Param[4].Mult['"ORCHECK"'] := IntToStr(OCList.Count); 1470 1471 for i := 0 to OCList.Count - 1 do 1472 begin 1473 // put quotes around everything to prevent broker from choking 1474 y := '"ORCHECK","' + Piece(OCList[i], U, 1) + '","' + Piece(OCList[i], U, 3) + '","' + IntToStr(i+1) + '"'; 1475 Param[4].Mult[y] := Pieces(OCList[i], U, 2, 4); 1476 end; 1477 Param[5].PType := literal; 1478 Param[5].Value := IntToStr(IsComplex); 1479 Param[6].PType := literal; 1480 Param[6].Value := FloatToStr(AnIMOOrderAppt); 1481 1463 begin 1464 ClearParameters := True; 1465 RemoteProcedure := 'ORWDXR RENEW'; 1466 Param[0].PType := literal; 1467 Param[0].Value := AnOrder.ID; 1468 Param[1].PType := literal; 1469 Param[1].Value := Patient.DFN; 1470 Param[2].PType := literal; 1471 Param[2].Value := IntToStr(Encounter.Provider); 1472 Param[3].PType := literal; 1473 Param[3].Value := IntToStr(Encounter.Location); 1474 Param[4].PType := list; 1475 for i := 0 to tmplst.Count - 1 do 1476 Param[4].Mult[IntToStr(i+1)] := tmplst[i]; 1477 Param[4].Mult['"ORCHECK"'] := IntToStr(OCList.Count); 1478 for i := 0 to OCList.Count - 1 do 1479 begin 1480 // put quotes around everything to prevent broker from choking 1481 y := '"ORCHECK","' + Piece(OCList[i], U, 1) + '","' + Piece(OCList[i], U, 3) + 1482 '","' + IntToStr(i+1) + '"'; 1483 Param[4].Mult[y] := Pieces(OCList[i], U, 2, 4); 1484 end; 1485 Param[5].PType := literal; 1486 Param[5].Value := IntToStr(IsComplex); 1487 Param[6].PType := literal; 1488 Param[6].Value := FloatToStr(AnIMOOrderAppt); 1482 1489 CallBroker; 1483 1490 SetOrderFromResults(AnOrder); … … 1510 1517 CallV('ORWDXA DCREASON', [nil]); 1511 1518 ExtractItems(Dest, RPCBrokerV.Results, 'DCReason'); 1512 DefaultIEN := StrToIntDef(Piece(ExtractDefault(RPCBrokerV.Results, 'DCReason'), U, 1), 0); 1519 //AGP Change 26.15 for PSI-04-63 1520 //DefaultIEN := StrToIntDef(Piece(ExtractDefault(RPCBrokerV.Results, 'DCReason'), U, 1), 0); 1513 1521 end; 1514 1522 … … 1528 1536 SetOrderFromResults(AnOrder); 1529 1537 AnOrder.ParentID := AParentID; 1530 1531 1538 end; 1532 1539
Note:
See TracChangeset
for help on using the changeset viewer.