Пример #1
0
        private void BuildPanelSetOrder(BsonDocument bsonParent)
        {
            MongoCollection panelSetOrderTable = this.m_SQLTransferDatabase.GetCollection <BsonDocument>("tblPanelSetOrder");
            MongoCursor     mongoCursor        = panelSetOrderTable.FindAs <BsonDocument>(Query.EQ("MasterAccessionNo", bsonParent.GetValue("MasterAccessionNo")));
            BsonArray       array = new BsonArray();

            foreach (BsonDocument bsonPSO in mongoCursor)
            {
                int panelSetId = bsonPSO.GetValue("PanelSetId").ToInt32();
                PSOTransferBuilder psoTransferBuilder = PSOTransferBuilder.GetPSOTransferBuilder(panelSetId);
                psoTransferBuilder.Build(bsonPSO, panelSetId);
                array.Add(bsonPSO);
            }

            bsonParent.Add("PanelSetOrderCollection", array);
        }
Пример #2
0
        public static PSOTransferBuilder GetPSOTransferBuilder(int panelSetId)
        {
            PSOTransferBuilder result = null;

            switch (panelSetId)
            {
            case 13:
                result = new PSOSurgicalTransferBuilder();
                break;

            case 15:
                result = new PSOCytologyTransferBuilder();
                break;

            default:
                result = new PSOTransferBuilder();
                break;
            }
            return(result);
        }