Skip to content

Commit

Permalink
Fixes #2133 liver zonation wrong formula (#2150)
Browse files Browse the repository at this point in the history
* Fixes #2133 liver zonation wrong formula

* Update layout to infact support checkbox for selection
  • Loading branch information
msevestre authored Mar 30, 2022
1 parent 5ebc1e6 commit ba2e8c5
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 1,724 deletions.
1,687 changes: 4 additions & 1,683 deletions src/Db/Diff/PKSimDB_diff.txt

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/Db/Dump/PKSimDB_dump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ INSERT INTO tab_species VALUES('Monkey','Monkey','Monkey',2,0,'Monkey',0);
INSERT INTO tab_species VALUES('Mouse','Mouse','Mouse',7,0,'Mouse',0);
INSERT INTO tab_species VALUES('Rabbit','Rabbit','Rabbit',10,0,'Rabbit',0);
INSERT INTO tab_species VALUES('Rat','Rat','Rat',6,0,'Rat',0);
INSERT INTO tab_species VALUES('Cat','Cat (beta version)','Cat',11,0,'Cat',0);
INSERT INTO tab_species VALUES('Cattle','Cattle (IV only) (beta version)','Cattle',12,0,'Cattle',0);
INSERT INTO tab_species VALUES('Cat','Cat (experimental)','Cat',11,0,'Cat',0);
INSERT INTO tab_species VALUES('Cattle','Cattle (IV only) (experimental)','Cattle',12,0,'Cattle',0);
CREATE TABLE tab_kinetic_types (
kinetic_type text NOT NULL,
display_name text NOT NULL,
Expand Down Expand Up @@ -4242,7 +4242,7 @@ INSERT INTO tab_calculation_method_rates VALUES('Observer_PKSim_4Comp','OBS_Plas
INSERT INTO tab_calculation_method_rates VALUES('Observer_PKSim_4Comp','OBS_PlasmaUnbound_PeripheralVenousBlood','(fQ_art*C_pls_art+fQ_bon*C_pls_bon+fQ_fat*C_pls_fat+fQ_mus*C_pls_mus+fQ_skn*C_pls_skn)*fu','Concentration (molar)');
INSERT INTO tab_calculation_method_rates VALUES('Observer_PKSim_4Comp','OBS_Tissue','(f_int*C_int+f_cell*C_cell)/(f_int+f_cell)','Concentration (molar)');
INSERT INTO tab_calculation_method_rates VALUES('Observer_PKSim_4Comp','OBS_Tissue_LargeIntestine','(M_int + M_cell + M_int_cae + M_cell_cae + M_int_colasc + M_cell_colasc + M_int_coltrans + M_cell_coltrans + M_int_coldesc + M_cell_coldesc + M_int_colsigm + M_cell_colsigm + M_int_rect + M_cell_rect)/(V_int + V_cell + V_int_cae + V_cell_cae + V_int_colasc + V_cell_colasc + V_int_coltrans + V_cell_coltrans + V_int_coldesc + V_cell_coldesc + V_int_colsigm + V_cell_colsigm + V_int_rect + V_cell_rect)','Concentration (molar)');
INSERT INTO tab_calculation_method_rates VALUES('Observer_PKSim_4Comp','OBS_Tissue_liv','(C_int_prp * V_int_prp + C_int_prc * V_int_prc + C_cell_prp * V_cell_prp + C_cell_prc * V_cell_prc)/(V_int_prp+V_int_prc+V_cell_prp)','Concentration (molar)');
INSERT INTO tab_calculation_method_rates VALUES('Observer_PKSim_4Comp','OBS_Tissue_liv','(C_int_prp * V_int_prp + C_int_prc * V_int_prc + C_cell_prp * V_cell_prp + C_cell_prc * V_cell_prc)/(V_int_prp + V_int_prc + V_cell_prp + V_cell_prc)','Concentration (molar)');
INSERT INTO tab_calculation_method_rates VALUES('Observer_PKSim_4Comp','OBS_Tissue_SmallIntestine','(M_int + M_cell + M_int_duo + M_cell_duo + M_int_uje + M_cell_uje + M_int_lje + M_cell_lje + M_int_uil + M_cell_uil + M_int_lil + M_cell_lil)/(V_int + V_cell + V_int_duo + V_cell_duo + V_int_uje + V_cell_uje + V_int_lje + V_cell_lje + V_int_uil + V_cell_uil + V_int_lil + V_cell_lil)','Concentration (molar)');
INSERT INTO tab_calculation_method_rates VALUES('Observer_PKSim_4Comp','OBS_TotalFractionDissolved','TotalOralDrugMass > 0 ? (M_sto + M_duo + M_uje + M_lje + M_uil + M_lil + M_cae + M_colasc + M_coltrans + M_coldesc + M_colsigm + M_rect + M_fec + Mabs_Mucosa) / TotalOralDrugMass : 0','Fraction');
INSERT INTO tab_calculation_method_rates VALUES('Observer_PKSim_4Comp','OBS_WholeBlood','(1 - HCT) * C_pls+HCT * C_bc','Concentration (molar)');
Expand Down Expand Up @@ -91026,7 +91026,7 @@ INSERT INTO tab_population_disease_states VALUES('BlackAmerican_NHANES_1997','CK
INSERT INTO tab_population_disease_states VALUES('MexicanAmericanWhite_NHANES_1997','CKD');
INSERT INTO tab_population_disease_states VALUES('WhiteAmerican_NHANES_1997','CKD');
CREATE TABLE tab_disease_states (disease_state text NOT NULL CONSTRAINT tab_disease_states_pk PRIMARY KEY, display_name text NOT NULL, description text NOT NULL);
INSERT INTO tab_disease_states VALUES('CKD','Chronic Kidney Disease - No Dialysis (Malik et al, 2020)',replace('Chronic kidney disease is renal impairment lasting at least 3 months. The disease is staged according to eGFR. Over time, multiple other body systems are also affected. To apply this disease state to an individual in PK-Sim, first select the targeted eGFR. Accordingly, the individual will display changes in GFR, kidney volume, kidney blood flow, plasma protein binding, hematocrit, gastric emptying time, and small intestinal transit time.\n\nThis parameterization is for individuals with CKD who are not on dialysis. It does not modify the expression or activity of enzymes or transporters - only foundational anatomy and physiology. Users should consult scientific literature for information how the relevant enzymes and transporters for their purposes may be affected.','\n',char(10)));
INSERT INTO tab_disease_states VALUES('CKD','Chronic Kidney Disease - No Dialysis (Malik et al, 2020) (experimental)',replace('Chronic kidney disease is renal impairment lasting at least 3 months. The disease is staged according to eGFR. Over time, multiple other body systems are also affected. To apply this disease state to an individual in PK-Sim, first select the targeted eGFR. Accordingly, the individual will display changes in GFR, kidney volume, kidney blood flow, plasma protein binding, hematocrit, gastric emptying time, and small intestinal transit time.\n\nThis parameterization is for individuals with CKD who are not on dialysis. It does not modify the expression or activity of enzymes or transporters - only foundational anatomy and physiology. Users should consult scientific literature for information how the relevant enzymes and transporters for their purposes may be affected.','\n',char(10)));
INSERT INTO tab_disease_states VALUES('Healthy','Healthy','Healthy individuals in PK-Sim are representative of the general population of individuals in the specified ethnicity and/or geographic area. These individuals are parameterized under the assumption that they have no chronic or comorbid disease states that would have a relevant effect on anatomy, physiology or drug disposition.');
CREATE TABLE tab_container_parameter_descriptor_conditions (container_id bigint NOT NULL, container_type text NOT NULL, container_name text NOT NULL, parameter_name text NOT NULL, tag text NOT NULL CONSTRAINT tab_container_parameter_descriptor_conditions_tab_tags_tag_fk REFERENCES tab_tags ON UPDATE CASCADE ON DELETE CASCADE, condition text NOT NULL CONSTRAINT tab_container_parameter_descriptor_conditions_tab_criteria_conditions_condition_fk REFERENCES tab_criteria_conditions ON UPDATE CASCADE ON DELETE CASCADE, operator TEXT DEFAULT "And" NOT NULL, CONSTRAINT tab_container_parameter_descriptor_conditions_tab_container_parameters_container_id_container_type_container_name_parameter_name_fk FOREIGN KEY (container_id, container_type, container_name, parameter_name) REFERENCES tab_container_parameters ON UPDATE CASCADE ON DELETE CASCADE);
INSERT INTO tab_container_parameter_descriptor_conditions VALUES(5015,'GENERAL','PROTEIN','Fraction expressed interstitial','Interstitial','Has','And');
Expand Down
Binary file modified src/Db/PKSimDB.sqlite
Binary file not shown.
6 changes: 4 additions & 2 deletions src/PKSim.Assets/PKSimConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ public static class UI
public static readonly string ReportCreationFinished = "Report created!";
public static readonly string CheckForUpdate = "Check for Update";
public static readonly string Template = "Template";
public static readonly string OnlyShowQualifiedTemplates = "Only show qualified templates";
public static readonly string OnlyShowQualifiedTemplates = "Only show OSP library released templates";
public static readonly string BuildingBlock = "Building Block";
public static readonly string BuildingBlocks = "Building Blocks";
public static readonly string AllowAging = "Allow aging";
Expand All @@ -2069,7 +2069,7 @@ public static class UI
public static readonly string SelectSimulationResultsFileToImport = "Select simulation results file to import...";
public static readonly string SelectPKAnalysesFileToImport = "Select PK-Analyses file to import...";
public static readonly string ResetLayoutSettingsToolTip = "Reset the application layout saved in the current user settings. This is necessary if the layout becomes corrupted.";
public static readonly string ReallyResetLayout = "Reseting the layout cannot be undone\nThe new layout will be implemented in the next PK-Sim start-up.";
public static readonly string ReallyResetLayout = "Resetting the layout cannot be undone\nThe new layout will be implemented in the next PK-Sim start-up.";
public static readonly string ShowOntogeny = "Show ontogeny data defined in the database...";
public static readonly string ImportOntogeny = "Load ontogeny from file...";
public static readonly string ShowingOntogenyData = "Ontogeny data...";
Expand Down Expand Up @@ -2236,6 +2236,8 @@ public static string DoYouWantToLoadExpressionProfiles(int numberOfSelectedItems
public static readonly string LocalizationVascularMembraneTissueSide = "Vascular endothelium membrane tissue-side";
public static readonly string ShowInitialConcentrationParameter = "Show initial concentration";
public static readonly string TemplateSource = "Template Source";
public static readonly string OSPLibraryRelease = "OSP Library Release";
public static readonly string Url = "Url";
public static readonly string LoadExpressionFromDatabase = "Database Query";
public static readonly string DiseaseState = "Disease State";
public static readonly string Select = "Select";
Expand Down
63 changes: 29 additions & 34 deletions src/PKSim.UI/Views/TemplateView.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/PKSim.UI/Views/TemplateView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,14 @@ public override void InitializeBinding()
_colVersion.XtraColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Far;

_colQualified = _gridViewBinder.AutoBind(x => x.Qualified)
.WithCaption(PKSimConstants.UI.OSPLibraryRelease)
.WithFormat(_booleanFormatter)
.AsReadOnly();

_colQualified.XtraColumn.AppearanceCell.TextOptions.HAlignment = HorzAlignment.Center;

_colUrl = _gridViewBinder.AutoBind(x => x.Url)
.WithCaption(PKSimConstants.UI.Url)
.WithRepository(x => _urlRepository);

var colDescription = _gridViewBinder.AutoBind(x => x.Description)
Expand Down
2 changes: 1 addition & 1 deletion src/PKSim.UI/Views/TemplateView.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<value>17, 17</value>
</metadata>
<metadata name="toolTipController.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>170, 17</value>
<value>146, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>48</value>
Expand Down

0 comments on commit ba2e8c5

Please sign in to comment.