예제 #1
0
    /// <summary>
    /// method
    /// US:902
    /// returns the worst state of the patient's item's components
    /// </summary>
    /// <param name="strPatientID"></param>
    /// <param name="lItemID"></param>
    /// <param name="strSpecifier"></param>
    /// <returns></returns>
    private CStringStatus ParsePICSummaryState(string strPatientID, long lItemID, string strSpecifier)
    {
        CPatientItemData PatientItem     = new CPatientItemData(BaseData);
        long             lSummaryStateID = -1;
        CStatus          status          = PatientItem.GetMostRecentPICSummaryStateID(
            strPatientID,
            lItemID,
            out lSummaryStateID);

        if (!status.Status)
        {
            return(new CStringStatus(status, CExpression.NullTkn));
        }

        string strValue = (lSummaryStateID < 1) ? CExpression.NullTkn : lSummaryStateID.ToString();

        return(new CStringStatus(status, strValue));
    }
예제 #2
0
    /// <summary>
    /// runs logic for a collection item this is na for now!
    /// too many issues to do this. ON hOLD!
    /// </summary>
    /// <param name="strPatientID"></param>
    /// <param name="lPatCLID"></param>
    /// <param name="lChecklistID"></param>
    /// <param name="lItemID"></param>
    /// <returns></returns>
    public CStatus RunCollectionLogic(string strPatientID,
                                      long lPatCLID,
                                      long lChecklistID,
                                      long lItemID)
    {
        CStatus status = new CStatus();

        DataSet dsColItems = null;

        CItemCollectionData icd = new CItemCollectionData(this);

        icd.GetItemCollectionDS(lItemID, out dsColItems);
        foreach (DataRow drItem in dsColItems.Tables[0].Rows)
        {
            try
            {
                //get the item type id
                long lColItemID = Convert.ToInt64(drItem["ITEM_ID"]);

                long             lSummaryStateID = -1;
                CPatientItemData pid             = new CPatientItemData(this);
                pid.GetMostRecentPICSummaryStateID(strPatientID,
                                                   lColItemID,
                                                   out lSummaryStateID);

                CPatientItemDataItem di = null;
                pid.GetMostRecentPatientItemDI(strPatientID,
                                               lColItemID,
                                               out di);
            }
            catch (Exception)
            {
                return(new CStatus(
                           false,
                           k_STATUS_CODE.Failed,
                           LogicModuleMessages.ERROR_RUN_LOGIC));
            }
        }

        return(status);
    }