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); }
public override XmlDocument ProcessQuery(StoredQuery objStoredQueryRequest) { XmlDocument xmlDocResponse = null; List <SubmissionSet> lstSubmissionSet = null; string patientUID = null; string submissionSetStatus = null; XmlDocument xmlDocAdHocQueryResponse; RegistryStoredQueryDataAccess objDAL = new RegistryStoredQueryDataAccess(); //string sSqlCode = string.Empty; //List<string> lstEntryUUIDs = null; //Construct SQL Query //sSqlCode = base.ConstructDynamicSQLQuery(objStoredQueryRequest); patientUID = base.RemoveSingleQuotes(GetParameterValue(objStoredQueryRequest.ParameterList, "$XDSSubmissionSetPatientId")); submissionSetStatus = base.PrepareForSqlInStatement(GetParameterValue(objStoredQueryRequest.ParameterList, "$XDSSubmissionSetStatus")); //Get SubmissionSets lstSubmissionSet = objDAL.GetSubmissionSets(submissionSetStatus, patientUID); //Get & Update SubmissionSet Author if (lstSubmissionSet != null && lstSubmissionSet.Count > 0) { lstSubmissionSet = UpdateSubmissionSetAuthor(lstSubmissionSet); //Filter based on SubmissionSet Author lstSubmissionSet = FilterByAuthor(lstSubmissionSet, objStoredQueryRequest.ParameterList); //Filter by SourceId lstSubmissionSet = FilterBySourceId(lstSubmissionSet, objStoredQueryRequest.ParameterList); //FilterByContentTypeCode lstSubmissionSet = FilterByContentTypeCode(lstSubmissionSet, objStoredQueryRequest.ParameterList); //FilterByContentSubmissionTime lstSubmissionSet = FilterByContentSubmissionTime(lstSubmissionSet, objStoredQueryRequest.ParameterList); } //Construct AdHocQueryResponse Element xmlDocAdHocQueryResponse = StoredQueryBase.ConstructAdHocQueryResponseElement(GlobalValues.CONST_RESPONSE_STATUS_TYPE_SUCCESS); if (objStoredQueryRequest.ReturnType.ToLower() == "leafclass") { //List<SubmissionSet> lstSubmissionSet = null; //lstSubmissionSet = objDAL.FindSubmissionSetLeafClass(sSqlCode); // Construct LeafClass - RegistryObjectList Element xmlDocResponse = ConstructLeafClassSubmissionSet(xmlDocAdHocQueryResponse, lstSubmissionSet); } else { //Default ObjectRef //Execute SQL & Get Document IDs //lstEntryUUIDs = objDAL.FindSubmissionSetObjectRef(sSqlCode); // Construct ObjectRef - RegistryObjectList Element xmlDocResponse = ConstructObjectRefSubmissionSet(xmlDocAdHocQueryResponse, lstSubmissionSet); } return(xmlDocResponse); }