DARIAEngineering / clinic_finder

A gem for clinic finding in case manager!
4 stars 1 forks source link

Fix business logic around pricing #18

Open cschlessinger opened 7 years ago

cschlessinger commented 7 years ago

Two parts:

  1. Easy: The weeks in the gestational helper file should round down (.floor rather than .ceil); if you're 9 weeks and 2 days, you should be considered at 9 weeks

  2. Harder: The pricing model is actually more complicated than a handful of predefined pricing schedule tiers. Each clinic measures cost differently, and can vary week to week. The case statements should be refactored to something else that handles whatever data the clinic generates (sorry, super vague, hopefully @colinxfleming can upload a chart and expand on this)

colinxfleming commented 7 years ago

Cc @lwaldsc. We have a very effective implementation but getting it to do the hard stuff will be a doozy. Be ready to explain it to me like 30 times, haha.

On Sun, Mar 5, 2017, 12:09 PM Claire Schlessinger notifications@github.com wrote:

Two parts:

1.

Easy: The weeks in the gestational helper file should round down (.floor rather than .ceil); if you're 9 weeks and 2 days, you should be considered at 9 weeks 2.

Harder: The pricing model is actually more complicated than a handful of predefined pricing schedule tiers. Each clinic measures cost differently, and can vary week to week. The case statements should be refactored to something else that handles whatever data the clinic generates (sorry, super vague, hopefully @colinxfleming https://github.com/colinxfleming can upload a chart and expand on this)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/colinxfleming/clinic_finder/issues/18, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsA9J5-l_0tp9_MwblHEBpmTrqn60tQks5rixZ2gaJpZM4MThzS .

lwaldsc commented 7 years ago

Let me know what is easiest for you to use (if it's just simply adding all weeks to the file, cool, if there's an easier way, also cool) in the code and I can start plugging in amounts per week.

Still can't believe this is an actual thing that works. I love you so much Team Clinic Finder.

On Tue, Mar 7, 2017 at 1:18 PM, Colin notifications@github.com wrote:

Cc @lwaldsc. We have a very effective implementation but getting it to do the hard stuff will be a doozy. Be ready to explain it to me like 30 times, haha.

On Sun, Mar 5, 2017, 12:09 PM Claire Schlessinger < notifications@github.com> wrote:

Two parts:

1.

Easy: The weeks in the gestational helper file should round down (.floor rather than .ceil); if you're 9 weeks and 2 days, you should be considered at 9 weeks 2.

Harder: The pricing model is actually more complicated than a handful of predefined pricing schedule tiers. Each clinic measures cost differently, and can vary week to week. The case statements should be refactored to something else that handles whatever data the clinic generates (sorry, super vague, hopefully @colinxfleming https://github.com/colinxfleming can upload a chart and expand on this)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/colinxfleming/clinic_finder/issues/18, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsA9J5-l_0tp9_ MwblHEBpmTrqn60tQks5rixZ2gaJpZM4MThzS .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/colinxfleming/clinic_finder/issues/18#issuecomment-284809462, or mute the thread https://github.com/notifications/unsubscribe-auth/AKFqsNvhFAzR08Kc-oAx92DrU5hiG_Yvks5rjZ9vgaJpZM4MThzS .

colinxfleming commented 7 years ago

We are in the process of wiring it up such that daria just logs it, but I have no idea how we are going to rep this in here. This might be a good thing to sit down with @kevin-wei and @lomky about at next hacknight come to think of it, since it's a 'rep a complex data structure' problem and I think they'd have a lot of insight.

On Tue, Mar 7, 2017, 12:57 PM Lisa notifications@github.com wrote:

Let me know what is easiest for you to use (if it's just simply adding all weeks to the file, cool, if there's an easier way, also cool) in the code and I can start plugging in amounts per week.

Still can't believe this is an actual thing that works. I love you so much Team Clinic Finder.

On Tue, Mar 7, 2017 at 1:18 PM, Colin notifications@github.com wrote:

Cc @lwaldsc. We have a very effective implementation but getting it to do the hard stuff will be a doozy. Be ready to explain it to me like 30 times, haha.

On Sun, Mar 5, 2017, 12:09 PM Claire Schlessinger < notifications@github.com> wrote:

Two parts:

1.

Easy: The weeks in the gestational helper file should round down (.floor rather than .ceil); if you're 9 weeks and 2 days, you should be considered at 9 weeks 2.

Harder: The pricing model is actually more complicated than a handful of predefined pricing schedule tiers. Each clinic measures cost differently, and can vary week to week. The case statements should be refactored to something else that handles whatever data the clinic generates (sorry, super vague, hopefully @colinxfleming https://github.com/colinxfleming can upload a chart and expand on this)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/colinxfleming/clinic_finder/issues/18, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsA9J5-l_0tp9_ MwblHEBpmTrqn60tQks5rixZ2gaJpZM4MThzS .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/colinxfleming/clinic_finder/issues/18#issuecomment-284809462 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AKFqsNvhFAzR08Kc-oAx92DrU5hiG_Yvks5rjZ9vgaJpZM4MThzS

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/colinxfleming/clinic_finder/issues/18#issuecomment-284820578, or mute the thread https://github.com/notifications/unsubscribe-auth/ADsA9MUGu48rDN0mSZbhgKShU01f-aPQks5rjaiKgaJpZM4MThzS .

lomky commented 7 years ago

I'll bring a white board :D

lwaldsc commented 7 years ago

YES COMPLEX PROBLEMS AND A WHITE BOARD INTO IT

colinxfleming commented 7 years ago

re: the harder ticket flagged by @cschlessinger, team code for dc sat down and decided that it was appropriate to do this dirty, so we're going to just roll out individual fields per week. A case manager pull request is in https://github.com/colinxfleming/dcaf_case_management/pull/961 .