Skip to content

Commit 0c83a2a

Browse files
ntatum94StevenAWhite
authored andcommitted
Cleaning up code
1 parent fe7a262 commit 0c83a2a

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

projects/biogears/libBiogears/include/biogears/cdm/patient/actions/SEBurnWound.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class BIOGEARS_API SEBurnWound : public SEPatientAction {
7878
bool operator!=(const SEBurnWound& rhs) const;
7979

8080
std::vector<double> GetTBSACompartmentDistribution() const;
81-
double SEBurnWound::GetTimeSinceBurn(SEScalarTime currentTime) const;
8281

8382
double getLeftArmSA() const;
8483
double getRightArmSA() const;

projects/biogears/libBiogears/src/cdm/patient/actions/SEBurnWound.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ bool SEBurnWound::HasCompartment() const
207207
bool SEBurnWound::HasCompartment(const std::string compartment) const
208208
{
209209
for (const std::string ca : m_compartmentsAffected) {
210-
if (compartment == ca)
210+
if (compartment == ca && m_DegreeOfBurn != CDM::enumBurnDegree::First)
211211
return true;
212212
}
213213
return false;
@@ -392,12 +392,6 @@ std::vector<double> SEBurnWound::GetTBSACompartmentDistribution() const
392392
m_compartments[4].GetValue() };
393393
}
394394
//-------------------------------------------------------------------------------
395-
double SEBurnWound::GetTimeSinceBurn(SEScalarTime currentTime) const
396-
{
397-
398-
return currentTime.GetValue() - m_burnInitiationTime;
399-
}
400-
//-------------------------------------------------------------------------------
401395
double SEBurnWound::getLeftArmSA() const { return m_compartments[0].GetValue(); }
402396
double SEBurnWound::getRightArmSA() const { return m_compartments[1].GetValue(); }
403397
double SEBurnWound::getTrunkSA() const { return m_compartments[2].GetValue(); }

projects/biogears/libBiogears/src/engine/Systems/Energy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ void Energy::UpdateHeatResistance()
738738
}
739739
if (isAnySegmentBurned) {
740740
SEBurnWound* burnAction = m_data.GetActions().GetPatientActions().GetBurnWound();
741-
double timeSinceBurn = burnAction->GetTimeSinceBurn(m_data.GetSimulationTime());
741+
double timeSinceBurn = m_data.GetSimulationTime().GetValue() - burnAction->GetTimeOfBurn();
742742
if (timeSinceBurn != 0.0) {
743743
double t = timeSinceBurn;
744744
double burnTemperature = (30.3 * std::exp(-1.0 * std::pow(t - 7.81, 2) / 11.7)) + GetSkinTemperature(TemperatureUnit::C);

share/xsd/cdm/PatientActions.xsd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ specific language governing permissions and limitations under the License.
171171
<xs:complexContent>
172172
<xs:extension base="PatientActionData">
173173
<xs:sequence>
174-
<xs:element name="BurnInitiationTime" type="xs:double" minOccurs="0" maxOccurs="1"/> <!--Automatically set on burn instantiation. Exists here for state loading/unloading-->
174+
<xs:element name="BurnInitiationTime" type="xs:double" minOccurs="0" maxOccurs="1"> <!--Automatically set on burn instantiation. Exists here for state loading/unloading-->
175+
</xs:element>
175176
<xs:element name="DegreeOfBurn" type="enumBurnDegree" minOccurs="0" maxOccurs="1"/>
176177
<xs:element name="TotalBodySurfaceArea" type="Scalar0To1Data" minOccurs="1" maxOccurs="1"/>
177178
<xs:element name="Compartments" type="xs:string" minOccurs="0" maxOccurs="5"/>

0 commit comments

Comments
 (0)