syntax = "proto3";
package pulse.study.bind.patient_variability;
option java_package = "com.kitware.pulse.study.bind.patient_variability";
option csharp_namespace = "pulse.study.bind.patient_variability";
option optimize_for = SPEED;

import "pulse/cdm/bind/Patient.proto";

enum eGenStyle
{
  Combinatorial = 0; /**<<@brief Classic combinatorial of all factors. */
  Slice         = 1; /**<<@brief Iterate 1 property at a time, hold other properties to their slice index value. */
}

message ParameterIterationData
{
  uint32          SliceIndex = 1;
  repeated double Values     = 2;
}


message ScenarioIterationData
{
  string                                           Name                        = 1;
  eGenStyle                                        GenStyle                    = 2;
  string                                           IterationName               = 3;
  string                                           ResultsDirectory            = 4;
  string                                           ScenarioDirectory           = 5;/**<< @brief Directory to generate scenarios in. */
  string                                           StateDirectory              = 6;/**<< @brief Directory to generate states in. */
}

message PatientIterationData
{
  ScenarioIterationData                            Scenario                    = 1;

  pulse.cdm.bind.PatientData.eSex                  Sex                         = 2;
  ParameterIterationData                           Age_yr                      = 3;
  ParameterIterationData                           Height_cm                   = 4;
  ParameterIterationData                           BodyMassIndex               = 5;
  ParameterIterationData                           BodyFatFraction             = 6;
  ParameterIterationData                           HeartRate_bpm               = 7;
  ParameterIterationData                           MeanArtierialPressure_mmHg  = 8;
  ParameterIterationData                           PulsePressure_mmHg          = 9;
  ParameterIterationData                           RespirationRate_bpm         = 10;

}

message ActionIterationData
{
  ScenarioIterationData                            Scenario                    = 1;
  
  bool                                             CreateStates                = 2;
  double                                           BaselineDuration_s          = 3;/**<< @brief How much time to advance before we add actions. */
  double                                           MaxSimTime_min              = 4;/**<< @brief Maximum amount of time to run this scenario. */
}

message TCCCIterationData
{
  ActionIterationData                              ActionIteration             = 1;
  bool                                             PerformInterventions        = 2;// Set to false to study injury effects only
  ParameterIterationData                           AirwayObstructionSeverity   = 3;
  ParameterIterationData                           HemorrhageSeverity          = 4;
  ParameterIterationData                           TensionPneumothoraxSeverity = 5;
  ParameterIterationData                           InsultDuration_s            = 6;
  ParameterIterationData                           SalineAvailable             = 7;// Should only contain 0 and/or 1
  ParameterIterationData                           NeedleAvaiable              = 8;// Should only contain 0 and/or 1
  ParameterIterationData                           ChestWrapAvailable          = 9;// Should only contain 0 and/or 1
}

