Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent ExternalInsulin type enum and isExternalInsulin attribute #102

Closed
avouspierre opened this issue Apr 14, 2024 · 1 comment
Closed
Assignees

Comments

@avouspierre
Copy link
Contributor

With the #93 the model PumpHistoryEvent is modified to add external insulin Type and a isExternalInsulin boolean :

struct type
CleanShot 2024-04-14 at 11 20 24 CleanShot 2024-04-14 at 11 20 54

However, when a external insulin is added with the interface, only the externalInsulin bool is defined to true (the type = bolus and no externalInsulin) :
CleanShot 2024-04-14 at 11 24 50

I also found a function never used by any code where isExternalInsulin = true
CleanShot 2024-04-14 at 11 22 52

The externalInsulinType is used by NS (and only by NS) to build a nightscoutTreatement object with a function to deduce the type : https://github.com/nightscout/Open-iAPS/blob/8ebd52a69612977cf705c5843d71250eb23bb009/FreeAPS/Sources/APS/Storage/PumpHistoryStorage.swift#L260

My proposal will be to remove the externalInsulin Type in Event Type and create a specific type enum for NS, avoid to have inconsistent between type and isExtrernalInsulin attribue.

@avouspierre
Copy link
Contributor Author

tested with #110 PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants