helpwave / services

helpwave's microservices
https://staging.api.helpwave.de/
Mozilla Public License 2.0
14 stars 1 forks source link

feat: unassign bed on discharge #848

Closed PaulKalho closed 1 month ago

PaulKalho commented 1 month ago

Which issues does this pull request close?

closes #843

PaulKalho commented 1 month ago

Shouldnt we rather solve this in the projections? The bed UUID is not a part of the unassigned event, therefore we should not pass this to UnassignBed. Also please add a test in our stories for this behaviour.

As you referred to the logic checking of the bedID: In my opinion, logically wrong events should not be published. We, most probably, have these kind of situations elsewhere in the code. I created an issue for that: https://github.com/helpwave/services/issues/854

FoseFx commented 1 month ago

Shouldnt we rather solve this in the projections?

I think this is fine. It's like the handler reacts to its own event and publishes another one on top.