@@ -70,6 +70,7 @@ SEPatient::SEPatient(Logger* logger) : Loggable(logger)
70
70
m_InspiratoryCapacity = nullptr ;
71
71
m_InspiratoryReserveVolume = nullptr ;
72
72
m_LeanBodyMass = nullptr ;
73
+ m_MuscleMass = nullptr ;
73
74
m_MeanArterialPressureBaseline = nullptr ;
74
75
m_ResidualVolume = nullptr ;
75
76
m_RespirationRateBaseline = nullptr ;
@@ -128,6 +129,7 @@ void SEPatient::Clear()
128
129
SAFE_DELETE (m_InspiratoryCapacity);
129
130
SAFE_DELETE (m_InspiratoryReserveVolume);
130
131
SAFE_DELETE (m_LeanBodyMass);
132
+ SAFE_DELETE (m_MuscleMass);
131
133
SAFE_DELETE (m_MeanArterialPressureBaseline);
132
134
SAFE_DELETE (m_ResidualVolume);
133
135
SAFE_DELETE (m_RespirationRateBaseline);
@@ -176,6 +178,8 @@ const SEScalar* SEPatient::GetScalar(const std::string& name)
176
178
return &GetInspiratoryReserveVolume ();
177
179
if (name.compare (" LeanBodyMass" ) == 0 )
178
180
return &GetLeanBodyMass ();
181
+ if (name.compare (" MuscleMass" ) == 0 )
182
+ return &GetMuscleMass ();
179
183
if (name.compare (" MeanArterialPressureBaseline" ) == 0 )
180
184
return &GetMeanArterialPressureBaseline ();
181
185
if (name.compare (" ResidualVolume" ) == 0 )
@@ -240,6 +244,8 @@ bool SEPatient::Load(const CDM::PatientData& in)
240
244
GetInspiratoryReserveVolume ().Load (in.InspiratoryReserveVolume ().get ());
241
245
if (in.LeanBodyMass ().present ())
242
246
GetLeanBodyMass ().Load (in.LeanBodyMass ().get ());
247
+ if (in.MuscleMass ().present ())
248
+ GetMuscleMass ().Load (in.MuscleMass ().get ());
243
249
if (in.MeanArterialPressureBaseline ().present ())
244
250
GetMeanArterialPressureBaseline ().Load (in.MeanArterialPressureBaseline ().get ());
245
251
if (in.ResidualVolume ().present ())
@@ -318,6 +324,8 @@ void SEPatient::Unload(CDM::PatientData& data) const
318
324
data.InspiratoryReserveVolume (std::unique_ptr<CDM::ScalarVolumeData>(m_InspiratoryReserveVolume->Unload ()));
319
325
if (m_LeanBodyMass != nullptr )
320
326
data.LeanBodyMass (std::unique_ptr<CDM::ScalarMassData>(m_LeanBodyMass->Unload ()));
327
+ if (m_MuscleMass != nullptr )
328
+ data.MuscleMass (std::unique_ptr<CDM::ScalarMassData>(m_MuscleMass->Unload ()));
321
329
if (m_MeanArterialPressureBaseline!=nullptr )
322
330
data.MeanArterialPressureBaseline (std::unique_ptr<CDM::ScalarPressureData>(m_MeanArterialPressureBaseline->Unload ()));
323
331
if (m_ResidualVolume != nullptr )
@@ -468,6 +476,9 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
468
476
case CDM::enumPatientEvent::ModerateAcuteRespiratoryDistress:
469
477
m_ss << " The patient has Moderate Acute Respiratory Distress" ;
470
478
break ;
479
+ case CDM::enumPatientEvent::MuscleCatabolism:
480
+ m_ss << " Patient has begun muscle catabolism" ;
481
+ break ;
471
482
case CDM::enumPatientEvent::MuscleGlycogenDepleted:
472
483
m_ss << " Patient's muscle glycogen is depleted" ;
473
484
break ;
@@ -496,7 +507,7 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
496
507
m_ss << " Patient has Tachypnea" ;
497
508
break ;
498
509
case CDM::enumPatientEvent::Fatigue:
499
- m_ss << " Patient has fatigue" ;
510
+ m_ss << " Patient has fatigue" ;
500
511
break ;
501
512
case CDM::enumPatientEvent::StartOfCardiacCycle:
502
513
case CDM::enumPatientEvent::StartOfExhale:
@@ -542,7 +553,7 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
542
553
m_ss << " Patient no longer has Diuresis" ;
543
554
break ;
544
555
case CDM::enumPatientEvent::Fasciculation:
545
- m_ss << " Patient no longer has fasciculations " ;
556
+ m_ss << " Patient no longer has Fasciculation " ;
546
557
break ;
547
558
case CDM::enumPatientEvent::FunctionalIncontinence:
548
559
m_ss << " Patient has an empty bladder" ;
@@ -635,7 +646,7 @@ void SEPatient::SetEvent(CDM::enumPatientEvent::value type, bool active, const S
635
646
m_ss << " Patient no longer has Tachypnea" ;
636
647
break ;
637
648
case CDM::enumPatientEvent::Fatigue:
638
- m_ss << " Patient is no longer fatigued" ;
649
+ m_ss << " Patient is no longer fatigued" ;
639
650
break ;
640
651
case CDM::enumPatientEvent::StartOfCardiacCycle:
641
652
case CDM::enumPatientEvent::StartOfExhale:
@@ -1005,6 +1016,23 @@ double SEPatient::GetLeanBodyMass(const MassUnit& unit) const
1005
1016
return m_LeanBodyMass->GetValue (unit);
1006
1017
}
1007
1018
1019
+ bool SEPatient::HasMuscleMass () const
1020
+ {
1021
+ return m_MuscleMass == nullptr ? false : m_MuscleMass->IsValid ();
1022
+ }
1023
+ SEScalarMass& SEPatient::GetMuscleMass ()
1024
+ {
1025
+ if (m_MuscleMass == nullptr )
1026
+ m_MuscleMass = new SEScalarMass ();
1027
+ return *m_MuscleMass;
1028
+ }
1029
+ double SEPatient::GetMuscleMass (const MassUnit& unit) const
1030
+ {
1031
+ if (m_MuscleMass == nullptr )
1032
+ return SEScalar::dNaN ();
1033
+ return m_MuscleMass->GetValue (unit);
1034
+ }
1035
+
1008
1036
bool SEPatient::HasMeanArterialPressureBaseline () const
1009
1037
{
1010
1038
return m_MeanArterialPressureBaseline==nullptr ?false :m_MeanArterialPressureBaseline->IsValid ();
0 commit comments