PostPartum-01-Example Implementation (Original - multiple steps)
Link to the original sprint or written use case - https://github.com/GovStackWorkingGroup/BuildingBlockAPI/projects/1
ID | UC-Post-Partum-001 |
|
Name | Registration for Postpartum Mother and Child Care Program (MCC) |
|
Description A brief, high-level description of what the use case accomplishes | This use case describes the registration process for a woman who has delivered her first baby into a government program that provides post-partum mother and infant care services to ensure both are healthy. |
|
Trigger (the event that triggers the use case) | When a government-accredited health worker opens a new registration form in the mother and child tracking system (MCTS) or equivalent government portal to register the woman and her newborn baby. |
|
Preconditions (list of conditions that MUST be met for the use case to be successful) |
|
|
Data inputs | 1. Name of the mother 2. National ID number of the mother 3 National ID number of the newborn 4. Name of the newborn baby 5. Place of birth (explain the rationale behind this field) 5. Time of birth 6. Location of birth |
|
Actors (a person, a company or organization, a computer program, or a computer system - hardware, software, or both) | Government-accredited health worker A woman who has delivered her first baby MCTS/ MCC application (Registration BB) Digital Registries BB Identity BB Consent BB Payment BB (for demo integration purposes only) Messaging BB Information Mediator BB National Population Registry (Digital Registries BB or Identity BB) MCC Membership Registry (Digital Registries BB) Case Management BB |
|
Normal Course (what happens if the event is triggered and the preconditions have been met) |
Feature: Get Consent Agreement
Scenario: MCC Application retrieves Consent Agreement for Mother
Given an Agreement for MCC user registration exists in Consent BB
And MCC Application has MCC application has Mother's <ID> and authentication token for the registration session
When MCC application fetches a Consent Agreement for MCC user registration
Then MCC application gets a valid Draft Consent Agreement associated with Mother's ID Relevant Consent BB Endponts
4. The health worker (via MCC Application) introduces to the Mother the Consent Agreement for fetching the relevant details from the Population registry for verification and appropriate use with the MCC and captures signature to the Consent Agreement from the Mother. Feature: Sign Consent Record
Background:
Given MCC Application has the Draft Consent Agreement associated with Mother's ID
And MCC application has Mother's <ID> and authentication token for the registration session
And Mother has read the Draft Consent Agreement
And Mother approves to sign the Draft Consent Agreement associated with Mother's ID
Scenario: Sign Consent Record on Paper
Given MCC application has captured the consent in a digital form (for example: scan of a paper form)
When MCC sends digital Consent Record payload to Consent BB
Then Consent BB digitally signs Consent Record
And Consent BB confirms to MCC Application that Consent Record for Mother has been successfully signed
Scenario: Sign Consent Record Digitally
Given Mother has capability to sign Consent Record digitally
When MCC sends the Draft Consent Agreement to Consent BB
Then Consent BB creates a paired ConsentRecord and Signature object
And Consent BB digitally signes Consent Record
And Consent BB confirms to MCC Application that Consent Record for Mother has been successfully signed
5. The MCC application form submits the verified national ID number to the Population registry hosted in the IDBB/Digital Registries BB seeking relevant details of the mother, by invoking the API “Data read value” on the Govstack Digital Registries BB. This scenario uses a set of features:
Feature: Verify Consent Record
MCC Application verifies if Mother has signed Consent Record to fetch the needed personal data from Population registry for MCC user registration
Scenario: Retrieve valid Consent Record
Given Mother has Signed Consent Record stored in Consent BB
When MCC Application makes the request to population registry API to fetch Mother's personal data
Then MCC Application makes prior request to Consent BB API to retrieve Mother's Signed Consent Record
And Consent BB sends the signed Consent Record to MCC Application
In response, the Govstack IDBB/ Digital Registries BB is expected to return the following:
7. The health worker verifies the details of the mother obtained from the population registry and ascertains the mother’s eligibility for the program.
Send a payment collection request - Outbound Txn Request / Gov Initiated P2G API - Response 10. The information passed to the Payment BB is used to access the payment information of the user kept at the level of the account lookup database, to get the mobile money account details of the mother. Account status and account name verification of payer's MM account - By Account Account Status Account Name By Identifier Account Status Account Name 11. The Govstack Payment BB requests the financial service provider to send out a push USSD payment message through the Govstack Messaging BB API to the mother’s mobile phone. Sending the message to the FSP for USSD push payment - Sample MM Outbound Transfer Request API (MPesa BuyGoods Confirmation API) 12. The health worker assists the mother to access and pay the registration fees through the USSD link and receive a “transactionId” from the FSP as confirmation of the successful transaction. 13. The health worker enters the same “transactionId” into the MCC application and requests verification and confirmation of the transaction, using the mobile money API: “Transfer Details”. Requests verification and confirmation of the transaction - Success Response Structure Generic Failure Response Structure 14. If the verification succeeds, the MCC will request the Govstack Identity BB for a new tokenized membership ID for the mother as a membership ID into the MCC program. <need the API spec for obtaining a unique tokenized ID and a proper curl command for the same, given the program ID and the mother’s national ID> 15. Upon successful confirmation of the payment, the health worker submits the registration application form and receives a confirmation (Membership ID) of the successful registration of the mother and child in the MCC. Gerkin: -<need to identify which API provides the confirmation of successful registration and what is the expected response.>- Response
16. The MCC application submits the mother’s MCC membership ID and appropriate details for creating a new consent agreement instance for the mother in the MCC system, by invoking the API “serviceCreateIndividualRecord” on the Govstack Consent BB. POST /individual/{id}/agreement/{agreementId}/ < @Ain Aaviksoo (Deactivated) - can you please validate the API and provide a proper curl command for the above> 17. Upon receiving the consent agreement ID from the Consent BB, the MCC application links the consent agreement ID with the mother’s MCC membership ID in its membership registry by invoking the Govstack Digital Registries BB API. Gerkin:
Response:
18. The health worker will generate using the MCC application a credential form of the membership ID of the mother (card, QR code, etc.) 19. The health worker records the details of the mother and child relevant to the MCC program in the MCC membership registry and inserts a link to/ uploads a copy of the newborn’s birth proof record by invoking the Govstack Digital Registries BB. <revisit/ validate this step> <need the API spec and a proper curl command for the above> 20. The MCC application sends a message through the Govstack Messaging BB informing the registration status and details (membership ID etc.) to the mother’s mobile phone. <need the API spec and a proper curl command for the above> |
|
Alternative Course (links to other use cases in case there are different ways how to solve the same use case) |
“GET /dataconsumer/consent/” 3. As there are multiple payment modes and flows each requiring different kinds of details, there needs to be an API with a higher level of abstraction, such as “InitiatePaymentRequest”. This API call needs to be exposed by the Govstack Payment BB and invoked by other applications, such as the Registration BB application in this case. |
|
Data output | The successful completion of the postpartum and infant care registration process will result in confirmation and issuance of a program-specific ID that can be used by the mother for future interactions with the program. |
|
Post-Conditions (the success criteria) | The mother and child are registered in the mother and child care program registry. |
|
Exceptions (error situations) |
|
|
Related BBs (working groups related to that particular use case) | Identity BB Consent BB Registration BB Digital Registries BB Payment BB |
|
Cross building block interaction diagram
Highlights the interactions between people and functional components <to be done>
See the editable version here.
Original user journey
Links and references to where the use case was derived