Skip to content

Commit

Permalink
Merge pull request #188 from codeforpakistan/fix-IWP
Browse files Browse the repository at this point in the history
  • Loading branch information
sohail0992 authored Dec 19, 2023
2 parents b02baa2 + b7ae111 commit 1265710
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions lib/hcai_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1151,11 +1151,11 @@ class _HcaiFormPageState extends State<HcaiFormPage> {
this._values[eachCalculation!['to']] ?? '',
this._values[eachCalculation!['from']] ?? '',
'days'),
// if (inBetween > -1)
// {
this._values[eachCalculation['calculatedKey']] =
inBetween.toString()
// }
if (inBetween != -1000)
{
this._values[eachCalculation['calculatedKey']] =
inBetween.toString()
}
});
}

Expand Down
6 changes: 3 additions & 3 deletions lib/utils/helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ class Helper {
{"name": "Suprapubic Tenderness", "index": 7}
];

static int daysBetweenDate(date1, date2, String returnType) {
static daysBetweenDate(date1, date2, String returnType) {
try {
if (isNullOrEmpty(date1) || isNullOrEmpty(date2)) {
return -1;
return -1000;
}
final startDate = DateTime.parse(date1.toString());
final endDate = DateTime.parse(date2.toString());
Expand All @@ -36,7 +36,7 @@ class Helper {
}
} catch (e) {
print('date range failed' + e.toString());
return -1;
return -1000;
}
}

Expand Down

0 comments on commit 1265710

Please sign in to comment.