@@ -300,7 +300,6 @@ void BurnThread::FluidLoading(double tbsa)
300300 double targetHighUrineProduction_mL_Per_Hr = 1.0 * weight_kg; // average of around 50ml/hr
301301 double DayLimit_mL = 4.0 * weight_kg * tbsa;
302302 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;
303- double initialInfustionAlbumin_mL_Per_hr = 40.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;
304303 double hrsBeforeIntervention = 1.0 ;
305304 double DayLimit_Hr = DayLimit_mL / 25.0 ;
306305 double temp = 0.0 ;
@@ -355,15 +354,6 @@ void BurnThread::FluidLoading(double tbsa)
355354 Status ();
356355 // m_bg->GetLogger()->Info(asprintf("Checking urine production %f %s", m_bg->GetRenalSystem()->GetMeanUrineOutput(VolumePerTimeUnit::mL_Per_hr), "mL_Per_hr"));
357356 urineProduction = m_bg->GetRenalSystem ()->GetMeanUrineOutput (VolumePerTimeUnit::mL_Per_hr );
358-
359- // to add "too high" and "too low" options for titrating
360- double scaleTitration = 1.0 ;
361- double errTitrate[] {0.9 , 1.0 , 1.1 };
362- int errSelection = rand () % (3 - 1 + 1 ) + 1 ;
363- scaleTitration = errTitrate[errSelection - 1 ];
364- scaleTitration = 1.0 ;
365- // m_bg->GetLogger()->Info(asprintf("Were they right? titrate percent is: %f %s", scaleTitration, "percent"));
366-
367357 if (fluid == ringers && fluidOn == true ) {
368358 if (((int )m_bg->GetSimulationTime (TimeUnit::s) + 1 ) == ((int )hrsBeforeIntervention*3600 )) {
369359 double beginningInfusion_mL_Per_hr = 10.0 * tbsa;
@@ -373,12 +363,12 @@ void BurnThread::FluidLoading(double tbsa)
373363 } else {
374364 if (urineProduction < targetLowUrineProduction_mL_Per_Hr) {
375365 m_bg->GetLogger ()->Info (asprintf (" Urine production is too low at %f %s" , urineProduction, " mL_Per_hr" ));
376- m_ringers->GetRate ().SetValue ((m_ringers->GetRate ().GetValue (VolumePerTimeUnit::mL_Per_hr )) * (1 + titrate) * scaleTitration , VolumePerTimeUnit::mL_Per_hr );
366+ m_ringers->GetRate ().SetValue ((m_ringers->GetRate ().GetValue (VolumePerTimeUnit::mL_Per_hr )) * (1 + titrate), VolumePerTimeUnit::mL_Per_hr );
377367 m_bg->ProcessAction (*m_ringers);
378368 }
379369 if ((m_bg->GetRenalSystem ()->GetMeanUrineOutput (VolumePerTimeUnit::mL_Per_hr ) > targetHighUrineProduction_mL_Per_Hr)) {
380370 m_bg->GetLogger ()->Info (asprintf (" Urine production is too high at %f %s" , urineProduction, " mL_Per_hr" ));
381- m_ringers->GetRate ().SetValue ((m_ringers->GetRate ().GetValue (VolumePerTimeUnit::mL_Per_hr )) * (1 - titrate) * scaleTitration , VolumePerTimeUnit::mL_Per_hr );
371+ m_ringers->GetRate ().SetValue ((m_ringers->GetRate ().GetValue (VolumePerTimeUnit::mL_Per_hr )) * (1 - titrate), VolumePerTimeUnit::mL_Per_hr );
382372 m_bg->ProcessAction (*m_ringers);
383373 }
384374 }
@@ -417,7 +407,27 @@ void BurnThread::FluidLoading(double tbsa)
417407 m_bg->ProcessAction (*m_escharotomy);
418408 }
419409 }
420-
410+ // escharotomy
411+ /* if (m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_Abdominal)
412+ || m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_LeftArm)
413+ || m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_LeftLeg)
414+ || m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_RightArm)
415+ || m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_RightLeg)) {
416+ if (m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_Abdominal)) {
417+ m_escharotomy->SetLocation("Trunk");
418+ } else if (m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_LeftArm)) {
419+ m_escharotomy->SetLocation("LeftArm");
420+ } else if (m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_LeftLeg)) {
421+ m_escharotomy->SetLocation("LeftLeg");
422+ } else if (m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_RightArm)) {
423+ m_escharotomy->SetLocation("RightArm");
424+ } else if (m_bg->GetPatient().IsEventActive(CDM::enumPatientEvent::CompartmentSyndrome_RightLeg)) {
425+ m_escharotomy->SetLocation("RightLeg");
426+ } else {
427+ return;
428+ }
429+ m_bg->ProcessAction(*m_escharotomy);
430+ }*/
421431 if (fluid == ringers) {
422432 if (m_ivBagVolume_mL < 1.0 ) {
423433 m_ringers->GetBagVolume ().SetValue (ringersVolume_mL, VolumeUnit::mL );
@@ -472,4 +482,4 @@ void BurnThread::FluidLoading(double tbsa)
472482 AdvanceTimeFluidsAlbumin ();
473483 }
474484 }
475- }
485+ }
0 commit comments