This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-16"?> | |
| <ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.518" Build="13.0.7050.2" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan"> | |
| <BatchSequence> | |
| <Batch> | |
| <Statements> | |
| <StmtSimple StatementCompId="5" StatementEstRows="317954" StatementId="1" StatementOptmLevel="FULL" CardinalityEstimationModelVersion="130" StatementSubTreeCost="16005900" StatementText="WITH BaseOrderData AS (
 -- Initial data extraction
 SELECT
 OOM.OrderDateTime AS DatePrescribed,
 REPLACE(DRCustom.dbo.WhsPiece('|',1,OO2.StatusBoardDisplayString),'{','') AS MedicationName,
 OPD.PhaQuantity AS Quantity,
 OPD.PhaRefills AS NumberOfRefills,
 OPD.PharmacyNdcDinNumber AS NDCNumber,
 LOC.[Name] AS PharmacyName,
 COALESCE(MPN.NameWithCredentialsStored, OO2.OrderProvider, OOM. |