Пример #1
0
 public DialyzerTestEnvironment()
 {
     DialysingFluidFlowCombinator.ConnectOutWithIn(DialyzingFluidDeliverySystem.DialyzingFluidFlowSource, Dialyzer.DialyzingFluidFlow);
     DialysingFluidFlowCombinator.ConnectOutWithIn(Dialyzer.DialyzingFluidFlow, DialyzingFluidDeliverySystem.DialyzingFluidFlowSink);
     BloodFlowCombinator.ConnectOutWithIn(Patient.ArteryFlow, Dialyzer.BloodFlow);
     BloodFlowCombinator.ConnectOutWithIn(Dialyzer.BloodFlow, Patient.VeinFlow);
     BloodFlowCombinator.CommitFlow();
     DialysingFluidFlowCombinator.CommitFlow();
 }
Пример #2
0
 public ExtracorporealBloodCircuitTestEnvironment()
 {
     BloodFlowCombinator.ConnectOutWithIn(Patient.ArteryFlow, ExtracorporealBloodCircuit.FromPatientArtery);
     ExtracorporealBloodCircuit.AddFlows(BloodFlowCombinator);
     BloodFlowCombinator.ConnectOutWithIn(ExtracorporealBloodCircuit.ToPatientVein, Patient.VeinFlow);
     BloodFlowCombinator.ConnectOutWithIn(ExtracorporealBloodCircuit.ToDialyzer, Dialyzer.BloodFlow);
     BloodFlowCombinator.ConnectOutWithIn(Dialyzer.BloodFlow, ExtracorporealBloodCircuit.FromDialyzer);
     BloodFlowCombinator.CommitFlow();
 }
Пример #3
0
 public void AddFlows(BloodFlowCombinator flowCombinator)
 {
     // The order of the connections matter
     flowCombinator.ConnectOutWithIns(FromPatientArtery,
                                      new IFlowComponentUniqueIncoming <Blood, Suction>[] { ArterialBloodPump.MainFlow, ArteriaPressureTransducer.SenseFlow });
     flowCombinator.ConnectOutsWithIn(new IFlowComponentUniqueOutgoing <Blood, Suction>[] { ArterialBloodPump.MainFlow, HeparinPump.HeparinFlow },
                                      ArterialChamber.MainFlow);
     flowCombinator.ConnectOutWithIn(ArterialChamber.MainFlow,
                                     ToDialyzer);
     flowCombinator.ConnectOutWithIns(FromDialyzer,
                                      new IFlowComponentUniqueIncoming <Blood, Suction>[] { VenousChamber.MainFlow, VenousPressureTransducer.SenseFlow });
     flowCombinator.ConnectOutWithIn(VenousChamber.MainFlow,
                                     VenousSafetyDetector.MainFlow);
     flowCombinator.ConnectOutWithIn(VenousSafetyDetector.MainFlow,
                                     VenousTubingValve.MainFlow);
     flowCombinator.ConnectOutWithIn(VenousTubingValve.MainFlow,
                                     ToPatientVein);
 }
		public void AddFlows(BloodFlowCombinator flowCombinator)
		{
			// The order of the connections matter
			flowCombinator.ConnectOutWithIns(FromPatientArtery,
				new IFlowComponentUniqueIncoming<Blood, Suction>[] { ArterialBloodPump.MainFlow, ArteriaPressureTransducer.SenseFlow });
			flowCombinator.ConnectOutsWithIn(new IFlowComponentUniqueOutgoing<Blood, Suction>[] { ArterialBloodPump.MainFlow, HeparinPump.HeparinFlow },
				ArterialChamber.MainFlow);
			flowCombinator.ConnectOutWithIn(ArterialChamber.MainFlow,
				ToDialyzer);
			flowCombinator.ConnectOutWithIns(FromDialyzer,
				new IFlowComponentUniqueIncoming<Blood, Suction>[] { VenousChamber.MainFlow, VenousPressureTransducer.SenseFlow });
			flowCombinator.ConnectOutWithIn(VenousChamber.MainFlow,
				VenousSafetyDetector.MainFlow);
			flowCombinator.ConnectOutWithIn(VenousSafetyDetector.MainFlow,
				VenousTubingValve.MainFlow);
			flowCombinator.ConnectOutWithIn(VenousTubingValve.MainFlow,
				ToPatientVein);
		}
Пример #5
0
		public void AddFlows(DialyzingFluidFlowCombinator dialysingFluidFlowCombinator, BloodFlowCombinator bloodFlowCombinator)
		{
			//Dialysate
			DialyzingFluidDeliverySystem.AddFlows(dialysingFluidFlowCombinator);
			//Blood
			bloodFlowCombinator.ConnectOutWithIn(FromPatientArtery,
				ExtracorporealBloodCircuit.FromPatientArtery);
			ExtracorporealBloodCircuit.AddFlows(bloodFlowCombinator);
			bloodFlowCombinator.ConnectOutWithIn(ExtracorporealBloodCircuit.ToPatientVein,
				ToPatientVein);
			//Insert Stubs
			bloodFlowCombinator.ConnectOutWithIn(ExtracorporealBloodCircuit.ToDialyzer,
				Dialyzer.BloodFlow);
			bloodFlowCombinator.ConnectOutWithIn(Dialyzer.BloodFlow,
				ExtracorporealBloodCircuit.FromDialyzer);
			dialysingFluidFlowCombinator.ConnectOutWithIn(DialyzingFluidDeliverySystem.ToDialyzer,
				Dialyzer.DialyzingFluidFlow);
			dialysingFluidFlowCombinator.ConnectOutWithIn(Dialyzer.DialyzingFluidFlow,
				DialyzingFluidDeliverySystem.FromDialyzer);
		}
Пример #6
0
		public Model()
		{
			_dialysingFluidFlowCombinator = new DialyzingFluidFlowCombinator();
			_bloodFlowCombinator = new BloodFlowCombinator();

			HdMachine = new HdMachine
			{
			};

			Patient = new Patient
			{
			};

			HdMachine.AddFlows(_dialysingFluidFlowCombinator, _bloodFlowCombinator);

			_bloodFlowCombinator.ConnectOutWithIn(HdMachine.ToPatientVein, Patient.VeinFlow);
			_bloodFlowCombinator.ConnectOutWithIn(Patient.ArteryFlow,HdMachine.FromPatientArtery);
			_bloodFlowCombinator.CommitFlow();
			_dialysingFluidFlowCombinator.CommitFlow();
		}