synthetichealth/synthea

insuranceExpenses field malformed on json export

hchorton opened this issue · 1 comments

What happened?

When generating a patient and exporting via json format, the coverage.planHistory.insuranceExpenses field appears to be malformed. In every instance, it is either represented with an uneccesary amount of decimal places appended to the end, or is coming as scientific notation.

Attached is an example of a patient that was generated with the malformed fields.

Melissia267_Bambi5_Collins926_414cf344-3bae-0b21-9efd-4780b36b0aa5.json

Environment

- OS: Microsoft Windows 11 Pro, Version 10.0.22621 Build 22621
- Java: java version 18.0.1.1

Relevant log output

No response

Digging into this a little further, it looks like it has something to do with the payMonthlyPremium function; when the premium price is 0, and the condition for a private non-ACA plan is met, the premium price is multiplied by the employeeContribution and it returns 0E-53. If it returns this amount and doesn't add anything else this is the amount that saves on the json. So probably less malformed and more of a formatting thing.