Jan Kaczorowski
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ### UC.1 Private person simple booking ```sequence booking wizard Personal Data->Order: create (state: cart) Order->LineItem: create Order->Payment: create payment checkout->Payment: update (state: placed) job->Order: update(state: delivered) Order->CompensationItem: create job->Order: update(state: settled) ``` >[name=Jan Kaczorowski][color=gold] > > :+1: nicely done, clarity at last! > ActionPoints: > - Create StatusUpdaterJob (covers both placed->delivered and delivered-settled transitions, per order) > - Update Order statuses #### order upgrade ```sequence service provider/admin->Order: upgrade Order->LineItem: update Order->Payment: update Payment->payment checkout: trigger ``` ### UC.2 Organizational Vaccination Order, patients as objects ```sequence admin->Order: create (state: placed) Order->LineItem: create Order->Payment: create job->Order: update(state: delivered) Order->CompensationItem: create job->Order: update(state: settled) ``` #### Business flow - (organization) makes a booking (or admin on their behalf) - patients register themselves by means of IPad or get registered by representative of an org #### IT flow - Booking object is the source of order information - in our current flow V2::Order is afterwards generated from a booking - Patient records get created along with PatLinks to Booking - Order.line_item.qty #### Doubts - should Order.line_item.qty be calculated out of booking.patient_count or should Order.line_item.qty be set upfront and limit the booking.patient_count >[name=Jan Kaczorowski][color=gold] > > I think we may wanna have interest in LineItem.qty being **decoupled** from booking.qty. Meaning: > Obviously, ultimately `line_item.qty == line_item.bookins.map(&:patient_count)` by the time order.order_state == 'settled', but prior to that if bookings.patient_count() < line_item.qty that'd mean order is just not yet delivered and thats just fine. (We would obviously have a checks and jobs to make all of it in sync but that gives us more freedom) - if line_item.qty limits the booking.patient_count - you either cannot have multiple bookings for line_item, only just one - or you cant calculate compensations out of lineItems (you can do that though from a booking obj) - you need to make sure that `line_item.qty` >= `line_item.bookings.map(&:patient_count).sum` to avoid situation in which vaccinated people count will exceed the number the customer is willing to pay for. > [name=Jérémie Poiraudau] couldn't we update the `line_item.qty` if `line_item.bookings.map(&:patient_count).sum > line_item.qty ` ### UC.3 Organizational Vaccination Order, patient number override - Booking object is the source of order information - in our current flow V2::Order is afterwards generated from a booking - Organization registered 5 initial patients, but then resolved to vaccinate additional 50, for all of which they are willing to pay. Admin desires to just set a line_item / booking qty to 55 somehow, and not to be bothered with having to create 50 extra fake patient objects. #### IT flow (hypothesis) - Booking has an additional column of `quantity`:int. - Booking.patient_count() calculates `quantity || patients.count` Order.line_item.qtity is set from `5` to `55` order gets recalculated. Status changes to `not_fulfilled` (or something?) ##### Option #1 if booking was not yet completed existing booking is updated (quantity field gets set to `55`) order gets recalculated ##### Option #2 if booking for those 5 ppl was already completed for those extra 50 patients another booking object is implicitly created and attached to the same `line_item` order gets recalculated ### UC.4 (future) Organizational order with multiple bookings #### Business flow - (organization) makes an order for COVID tests for 100 folks - these tests are to be conducted within 2 month timeframe - That produces V2::Order with 1 V2::LineItem with qty=100 - to that there will be, say 1 booking a month, for a total of two bookings. - the pat_number of any of those booking is a rough estimate (can be 50 and 50, but theres an understanding that all kinds of things can happen, like for a first 20 ppl will show up, and 80 ppl for the second), so it has to be flexible. - we don't wanna create those patient records - organization already paid for 100 folks, and thats the patient cap for both of the bookings combined - question: how should the compensation look like? > [name=Jérémie Poiraudau] > - I'm not sure we should have a "patient cap" but we should require an extra payment on quantity update. > - > [name=Jérémie Poiraudau] UC.5 Organizational Booking through the vaccine wizard. > #### Business flow > - OrganizationBooking is created first, without patient and user linked to it > - the customer select the line_item quantity. Cart and line_item is created simultaneously > - customer enter order details, order is created. > - the order is subject to change : first by the customer as he can come back during the vaccine wizard and change the vaccines quantity on the line_item. The admin has also the possibility to change the vaccines quantity or adding patients to the underlying booking.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully