Evaluating Temporal For Healthcare usecase

I am looking for the solution to manage distributed workflows in healthcare and temporal is one of the candidates.

Our usecase is processing Claims and enrollments from insurance companies and those are long lasting transactions where temporal could fit as a solution. To briefly describe steps in example of enrollment (enrollment object consists of Patient Object and Coverage Object and some metadata) processing since that is a simpler use case:

  1. Match patient from enrollment against existing patients in database
  2. If matched use existing patient id that got resolved during matching in previous step and create new version of patient
  3. if not matched generate uique ID and store the patient in DB
  4. Reference patient ID inside of coverage
  5. match coverage against existing coverages in database
  6. if match update
    7 if not match crate new with unique id

So this is like long lasting transaction and my initial thought was to use saga pattern. But the challenge is that with using async saga pattern we end up creating duplicates. It is common that we have multiple claims or enrollments for the same patient in the same partition ordered one behind another. So since the processing is asynchronous we might have E2 with offset 2 going through step 1 before event E1 with offset 1 is indexed at step 2 so we end up with the non match for E2 and assign new unique ID to patient with E2 incorrectly instead of matching them together.
Basically I need to be able to process event synchronously between steps. Kind of like only start processing E2 when E1 is indexed.

Do you have nay suggestions on how temporal can help me achieve this functionality or maybe if there is a better approach than saga to solve this?

I would recommend having a single workflow with patient id. Then send signals to that workflow to initiate the processing of a claim or enrollment. This way the workflow becomes a single point of control for the customer and all the race conditions are eliminated.