예제 #1
0
        public override System.Xml.XmlDocument ProcessQuery(StoredQuery objStoredQueryRequest)
        {
            XmlDocument          xmlDocResponse = null;
            XmlDocument          xmlDocAdHocQueryResponse;
            List <SubmissionSet> lstSubmissionSet = null;
            List <DocumentEntry> lstDocumentEntry = null;
            List <Folder>        lstFolder        = null;
            List <Association>   lstAssociation   = null;
            string patientUID          = null;
            string submissionSetStatus = null;
            string documentEntryStatus = null;
            string folderStatus        = null;
            string documentEntryUUIDs  = null;
            RegistryStoredQueryDataAccess objStoredQueryDAL = new RegistryStoredQueryDataAccess();

            patientUID          = base.RemoveSingleQuotes(GetParameterValue(objStoredQueryRequest.ParameterList, "$patientId"));
            submissionSetStatus = base.PrepareForSqlInStatement(GetParameterValue(objStoredQueryRequest.ParameterList, "$XDSSubmissionSetStatus"));
            documentEntryStatus = base.PrepareForSqlInStatement(GetParameterValue(objStoredQueryRequest.ParameterList, "$XDSDocumentEntryStatus"));
            folderStatus        = base.PrepareForSqlInStatement(GetParameterValue(objStoredQueryRequest.ParameterList, "$XDSFolderStatus"));

            //SubmissionSet
            lstSubmissionSet = objStoredQueryDAL.GetSubmissionSets(submissionSetStatus, patientUID);

            //DocumentEntry
            lstDocumentEntry   = objStoredQueryDAL.GetDocumentEntries(documentEntryStatus, patientUID);
            lstDocumentEntry   = GetDocumentEntries(lstDocumentEntry, objStoredQueryRequest);
            documentEntryUUIDs = GetDocumentEntryUUIDs(lstDocumentEntry);

            //Folders
            lstFolder = objStoredQueryDAL.GetFolders(folderStatus, patientUID);

            //Associations
            lstAssociation = objStoredQueryDAL.GetAssociations(documentEntryUUIDs, null);


            //Construct AdHocQueryResponse Element
            xmlDocAdHocQueryResponse = StoredQueryBase.ConstructAdHocQueryResponseElement(GlobalValues.CONST_RESPONSE_STATUS_TYPE_SUCCESS);

            xmlDocResponse = ConstructRegistryObjectList(xmlDocAdHocQueryResponse, lstSubmissionSet, lstDocumentEntry, lstFolder, lstAssociation);

            return(xmlDocResponse);
        }
예제 #2
0
        protected List <DocumentEntry> GetDocumentEntries(string patientUID, List <string> lstAvailabilityStatus)
        {
            List <DocumentEntry>          lstDocumentEntry = null;
            RegistryStoredQueryDataAccess storedQueryDAL   = null;
            string availabilityStatus = null;

            storedQueryDAL = new RegistryStoredQueryDataAccess();

            availabilityStatus = PrepareForSqlInStatement(lstAvailabilityStatus);
            lstDocumentEntry   = storedQueryDAL.GetDocumentEntries(availabilityStatus, patientUID);

            if ((lstDocumentEntry == null) || (lstDocumentEntry.Count == 0))
            {
                return(lstDocumentEntry);
            }

            foreach (DocumentEntry documentEntry in lstDocumentEntry)
            {
                documentEntry.EventCodeList = storedQueryDAL.GetDocumentEntryEventCodeList(documentEntry.ID);
            }

            return(lstDocumentEntry);
        }