update
This commit is contained in:
parent
61994bafb0
commit
0dfb7fab72
|
@ -9,6 +9,16 @@ def formatExperienceTitle:
|
|||
. as $experience |
|
||||
"\"\(.title)\": \(.creationDate / 1000 | strftime("%d-%m-%Y"))";
|
||||
|
||||
def formatDose($dose; $unit; $isEstimate; $standardDeviation):
|
||||
if $dose == null then
|
||||
"Unknown"
|
||||
else
|
||||
(if $isEstimate then "~" else "" end) as $estimate |
|
||||
(if $standardDeviation != null then "±\($standardDeviation)" else "" end) as $standardDeviation |
|
||||
|
||||
"\($estimate)\($dose | numberLib::round(2))\($standardDeviation) \($unit)"
|
||||
end;
|
||||
|
||||
def formatIngestionDose($customUnits):
|
||||
. as $ingestion |
|
||||
(. | journalLib::ingestionDose($customUnits)) as $dose |
|
||||
|
@ -18,14 +28,13 @@ def formatIngestionDose($customUnits):
|
|||
if $ingestion.dose == null then
|
||||
"Unknown"
|
||||
elif $customUnit == null then
|
||||
if $ingestion.isDoseAnEstimate then "~" else "" end +
|
||||
"\($dose | numberLib::round(2))" +
|
||||
if $standardDeviation != null then
|
||||
"±\($standardDeviation)"
|
||||
else "" end +
|
||||
" \($unit)"
|
||||
formatDose($dose; $unit; $ingestion.isDoseAnEstimate; $standardDeviation)
|
||||
else
|
||||
"\($dose) \($unit) (\($customUnit.dose) \($unit) * \($ingestion.dose) \($customUnit.unit))"
|
||||
formatDose($dose; $unit; $ingestion.isDoseAnEstimate; $standardDeviation) +
|
||||
" (" +
|
||||
formatDose($customUnit.dose; $unit; $customUnit.isEstimate; $customUnit.estimatedDoseStandardDeviation) +
|
||||
" * " +
|
||||
formatDose($ingestion.dose; $customUnit.unit; $ingestion.isDoseAnEstimate; $ingestion.estimatedDoseStandardDeviation)
|
||||
end;
|
||||
|
||||
def formatIngestionTime:
|
||||
|
|
Loading…
Reference in a new issue