From product execution BOM to confirmed visits

The appointment service does not reinterpret the package. It validates the immutable booking contract, expands it into a plan and visits, and confirms only an accepted proposal. Select a step to inspect its input, processing, and output.

PRODUCT SERVICE

Product traits, package, version

Validate required/choice items, repetition, time/resource provenance, dependencies, and visit grouping before publishing.

EVENT CONTRACT

Immutable execution BOM

version · provenance
snapshotHash

APPOINTMENT SERVICE

Plan · visits · proposal · consent · hold

Place the supplied treatment obligations on real resources and confirm only an agreed proposal.

Input

    Output

      Example · lifting focused-care package

      One purchase becomes four treatment obligations and three visit candidates.

      PackageExecutionSnapshot

      Expanded by product service
      Pre-treatment diagnosis v3required
      Lifting treatment v5required
      Soothing care v4selected
      Follow-up check v2required

      AppointmentPlan revision 1

      Copied without reinterpretation
      PlannedTreatment4 items
      BLOCKING edge2
      MAY_SAME_VISIT1
      MUST_SEPARATE2

      Visit candidates

      Policy + resources + preferred dates
      Visit A · diagnosis

      PROPOSED · specialist + consultation room

      Visit B · lifting + soothing

      Same visit · device + procedure + recovery

      Visit C · follow-up

      Seven days after treatment · separate visit

      PROPOSEDHELD→ consentCONFIRMED

      Only future work is recalculated

      Completed facts and existing confirmed appointments stay protected; only affected unfinished items become a new visit or proposal.

      Completed treatment

      Pin the original productVersionId and planRevisionId. Never rewrite it during a version switch.

      COMPLETEDIMMUTABLE

      Partial fulfillment

      Keep completed items and create a new AppointmentItem for each remaining attempt.

      REMAINING ITEMNEW VISIT

      Closure or equipment downtime

      Do not silently overwrite a confirmed appointment. Create a proposal and obtain consent.

      NEW PROPOSALCONSENTRECONFIRMED