@@ -125,6 +125,8 @@ BurnThread::BurnThread(const std::string logFile, double tbsa)
125125 m_bg->GetEngineTrack ()->GetDataRequestManager ().CreatePhysiologyDataRequest ().Set (" MeanUrineOutput" , " mL/hr" );
126126 m_bg->GetEngineTrack ()->GetDataTrack ().Probe (" totalFluid_mL" , m_TotalVolume_mL);
127127 m_bg->GetEngineTrack ()->GetDataTrack ().Probe (" bagVolume_mL" , m_ivBagVolume_mL);
128+ m_bg->GetEngineTrack ()->GetDataTrack ().Probe (" totalFluidAlbumin_mL" , m_TotalVolumeAlbumin_mL);
129+ m_bg->GetEngineTrack ()->GetDataTrack ().Probe (" bagVolumeAlbumin_mL" , m_ivBagVolumeAlbumin_mL);
128130
129131 // Load substances and compounds
130132 SESubstanceCompound* ringers = m_bg->GetSubstanceManager ().GetCompound (" RingersLactate" );
@@ -296,7 +298,7 @@ void BurnThread::FluidLoading(double tbsa)
296298 // compute urine production and max fluid requirements, per parkland formula
297299 const SEPatient& patient = m_bg->GetPatient ();
298300 double weight_kg = patient.GetWeight (MassUnit::kg);
299- double targetLowUrineProduction_mL_Per_Hr = 0.5 * weight_kg ;
301+ double targetLowUrineProduction_mL_Per_Hr = 30.0 ;
300302 double targetHighUrineProduction_mL_Per_Hr = 1.0 * weight_kg; // average of around 50ml/hr
301303 double DayLimit_mL = 4.0 * weight_kg * tbsa;
302304 double initialInfustion_mL_Per_hr = 0.0 ; // tbsa * 10.0; // Should start at 10*tbsa // (DayLimit_mL / 0.5) / 8.0; //half of the fluid should be loaded in the first 8 hours;
@@ -344,9 +346,11 @@ void BurnThread::FluidLoading(double tbsa)
344346 }
345347
346348 // set fluid to albumin at the 8 hour mark
347- if ((int )m_bg->GetSimulationTime (TimeUnit::min ) == (int )120 ) {
349+ if ((int )m_bg->GetSimulationTime (TimeUnit::s ) == (int )28800 ) {
348350 fluid = albumin;
349351 m_bg->GetLogger ()->Info (asprintf (" adding albumin" ));
352+ m_bg->GetLogger ()->Info (asprintf (" Beginning Intervention with infusion at %f %s" , initialInfustionAlbumin_mL_Per_hr, " mL_Per_hr" ));
353+ SetAlbuminInfusionRate (ringersVolume_mL, initialInfustionAlbumin_mL_Per_hr);
350354 }
351355
352356 // check urine every hour, reset the volume while we are at it
@@ -362,7 +366,7 @@ void BurnThread::FluidLoading(double tbsa)
362366 scaleTitration = errTitrate[errSelection - 1 ];
363367 // m_bg->GetLogger()->Info(asprintf("Were they right? titrate percent is: %f %s", scaleTitration, "percent"));
364368
365- if (fluid == ringers && fluidOn == true ) {
369+ if (fluidOn == true ) {
366370 if (((int )m_bg->GetSimulationTime (TimeUnit::s) + 1 ) == ((int )hrsBeforeIntervention*3600 )) {
367371 double beginningInfusion_mL_Per_hr = 10.0 * tbsa;
368372 m_bg->GetLogger ()->Info (asprintf (" Beginning Intervention with infusion at %f %s" , beginningInfusion_mL_Per_hr, " mL_Per_hr" ));
@@ -383,13 +387,13 @@ void BurnThread::FluidLoading(double tbsa)
383387 }
384388 if (fluid == albumin && fluidOn == true ) {
385389 if (urineProduction < targetLowUrineProduction_mL_Per_Hr) {
386- m_bg->GetLogger ()->Info (asprintf (" Urine production is too low at %f %s " , urineProduction, " mL_Per_hr " ));
387- m_albumex->GetRate ().SetValue ((m_albumex->GetRate ().GetValue (VolumePerTimeUnit::mL_Per_hr )) * ( 1 + titrate) * scaleTitration , VolumePerTimeUnit::mL_Per_hr );
390+ m_bg->GetLogger ()->Info (asprintf (" Albumin staying at the same rate " ));
391+ m_albumex->GetRate ().SetValue ((m_albumex->GetRate ().GetValue (VolumePerTimeUnit::mL_Per_hr )), VolumePerTimeUnit::mL_Per_hr );
388392 m_bg->ProcessAction (*m_albumex);
389393 }
390394 if ((m_bg->GetRenalSystem ()->GetMeanUrineOutput (VolumePerTimeUnit::mL_Per_hr ) > targetHighUrineProduction_mL_Per_Hr)) {
391- m_bg->GetLogger ()->Info (asprintf (" Urine production is too high at %f %s " , urineProduction, " mL_Per_hr " ));
392- m_albumex->GetRate ().SetValue ((m_albumex->GetRate ().GetValue (VolumePerTimeUnit::mL_Per_hr )) * ( 1 - titrate) * scaleTitration , VolumePerTimeUnit::mL_Per_hr );
395+ m_bg->GetLogger ()->Info (asprintf (" Albumin staying at the same rate " ));
396+ m_albumex->GetRate ().SetValue ((m_albumex->GetRate ().GetValue (VolumePerTimeUnit::mL_Per_hr )), VolumePerTimeUnit::mL_Per_hr );
393397 m_bg->ProcessAction (*m_albumex);
394398 }
395399 }
@@ -425,14 +429,12 @@ void BurnThread::FluidLoading(double tbsa)
425429 }
426430 }
427431 // make sure that the bag is full
428- if (fluid == ringers) {
429432 if (m_ivBagVolume_mL < 1.0 ) {
430433 m_ringers->GetBagVolume ().SetValue (ringersVolume_mL, VolumeUnit::mL );
431434 m_bg->GetLogger ()->Info (" ringers IV bag is low, refilling bag \n " );
432435 m_bg->ProcessAction (*m_ringers);
433436 m_ivBagVolume_mL = ringersVolume_mL; // tracking purposes
434437 }
435- }
436438
437439 if (fluid == albumin) {
438440 if (m_ivBagVolumeAlbumin_mL < 1.0 ) {
@@ -462,12 +464,8 @@ void BurnThread::FluidLoading(double tbsa)
462464 }
463465
464466 // advance time
465- if (fluid == ringers) {
466- AdvanceTimeFluids ();
467- }
468467
469- if (fluid == albumin) {
470- AdvanceTimeFluidsAlbumin ();
471- }
468+ AdvanceTimeFluids ();
469+
472470 }
473471}
0 commit comments