coop-care / paid

PAID is library for care billing with payers in Germany according to § 105 SGB XI and § 302 SGB V. The project name is an acronym and stands for "Pflegeabrechnung in Deutschland".
GNU Lesser General Public License v3.0
10 stars 3 forks source link

type Leistung #48

Closed westnordost closed 2 years ago

westnordost commented 3 years ago

Issue

Solution

Just type it. A Leistung can be a "Wegegeld Leistung", a "Zeitvergütung Leistung", a "Pflegehilfsmittel Leistung" etc. Depending on the type of Leistung, different fields are mandatory and the fields are named and typed according to what should be filled in.

westnordost commented 3 years ago

In the implemented solution, leistungsBeginn and leistungsEnde is optional in all types of Leistung, even though leistungsBeginn is only mandatory for verguetungsart 04 and leistungsEnde is only mandatory for verguetungsart 01, 02, 03 or 04. I did this because you have some logic in index.ts that assumes that any Leistung potentially has these fields defined (for grouping and sorting Leistungen by time/date). I wasn't sure if you'd be okay with changing this logic. You might argue that for convenience/consistency reasons, you'd want the user in coop-care to always specify the start and end time of any Leistung in the UI even when it is not necessary for billing.

I can change this to be stricter, if you wish. I.e. e.g. leistungsBeginn would be a field in VollstationaerOderKurzzeitpflegeLeistung only.

westnordost commented 3 years ago

Review note: Look at types.ts first.

westnordost commented 2 years ago

It has been some time since I looked at it. But I think that's fair enough - if the type is removed, there should simply be a documentation comment that explains that hte optional field is actually mandatory if XYZ.

Do you expect me to change this or will you do it?

michaelkamphausen commented 2 years ago

I will take care of it.