Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Link to the original sprint or written use case -https://github.com/GovStackWorkingGroup/BuildingBlockAPI/projects/1

Feature: MCC application signs Consent Record Given: MCC has obtained Consent Agreement with state: unsigned and MCC
  1. and asks for a consent to do so.

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)

  • The government-accredited health worker has successfully logged into the MCTS government portal(Registration BB) and has the necessary authorization to complete the registration process of the mother and child into the postpartum care program.

  • Data sharing agreement between Registration BB and respective registries where information is queried from has been signed (contract) and respective REST API services in Information Mediator has been opened to Registration BB.

  • The mother and newborn have already been registered in a national identification system (ID BB).

  • The mother has her identity proof (card, QR code, ID number, etc) available together with the required credentials for the MCC that can be verified and authenticated with the national ID system.

  • The mother has a mobile money account linked to a mobile number.

  • USSD short code for making the payment using mobile money required for registration into the MCC.

  • The mother has her child’s identity proof (card, QR code, ID number, etc) available together with the required credentials for the MCC that can be verified and authenticated with the national ID system.

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)

  1. The registration form screen for the MCC application provides a list of initial details required to proceed with the registration (eligibility verification, required documents, required fees).

  2. The health worker enters the required initial details, including, but not limited to the following:

    1. Mother’s and newborn baby’s National ID number

    2. Name of the newborn child

    3. Date of Birth

    4. Place of Birth (such as home, clinic, etc.)

    5. Time of Birth

    6. Location of Birth

  3. The health worker ( i.e “Healthcare MCC Application) suggests the Mother an option to retrieve additional data from the Population Registry in the form of a Consent Agreement.

    1. Relevant Consent BB Endponts

      1. Getting the agreement:
        /service/agreement/{agreementId}/

      2. Getting the related policy:
        /service/policy/{policyId}/

      3. Getting related purpose:
        /service/purpose/{purposeId}/

      4. Get related agreement data:
        /service/agreement/{agreementId}/agreementdata/

  4. Healthcare Application captures signature to the Consent Agreement from the mother for fetching the relevant details from the Population registry for verification and appropriate use with the MCC.

Code Block
languagenone
Code Block
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 Mother's authentication token for the registration session
  When: MotherMCC confirms her consent, which is expressed in a digital form (for example: scan of a paper form) 
  Then:application fetches a Consent Agreement for MCC user registration
  Then MCC application gets a blankvalid SignatureDraft objectConsent fromAgreement IDassociated BBwith     and MCC application combines usigned Consent Agreement with Signature object
    and MCC application submits the updated & signed Signature object to ID BB
    and ID BB returns signed hash of the Consent Record
    and MCC application returns Consent Record with state:signed to Consent BB 
  1. The next step is to verify the identity attributes based on the national ID details provided by the mother. The registration form will invoke the API “VerifyIdentity” on the Govstack Identity BB passing the following details of the mother: National ID number. <this step may not be necessary> <need the Open API spec to create a proper curl command for the above>

  2. If the national ID verification is unsuccessful, the health worker informs the mother that the registration cannot proceed without producing a valid form of national ID.

  3. 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.

Code Block
Feature: The health care worker imports Mother's ID

Relevant Consent BB Endponts

  • Getting the agreement:
    /service/agreement/{agreementId}/

  • Getting the related policy:
    /service/policy/{policyId}/

  • Getting related purpose:
    /service/purpose/{purposeId}/

  • Get related agreement data:
    /service/agreement/{agreementId}/agreementdata/

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.

Code Block
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
  1. The next step is to verify the identity attributes based on the national ID details provided by the mother. The registration form will invoke the API “VerifyIdentity” on the Govstack Identity BB passing the following details of the mother: National ID number. <this step may not be necessary> <need the Open API spec to create a proper curl command for the above>

  2. If the national ID verification is unsuccessful, the health worker informs the mother that the registration cannot proceed without producing a valid form of national ID.

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:

  • Verify Consent Record by Consent BB

  • Import data from a registry by Registry BB

Code Block
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

Code Block
Feature: Imports client personal data from a registry

Scenario Outline:


import

Import 

mothers

Mother's pesonal information from 

national

Population 

population

Registry 

registry

to the e-service form

Given 

Sona

Mother has entered <ID> in the Registration e-service registration form, national ID number field
    And MCC Application has received Signed Consent Record from Consent BB
   When the 

social

MCC 

health

Application 

activist named "Sona"

user pushes a button "Import Mothers's information"
   Then the 

Registration

MCC 

system

Application makes a request to 

population

Population 

registry

Registry API
    And Population Registry returns requested data to MCC Application
    And MCC Application fills the form on the screen with Mothers data <ID>,<first>, <last>, <birth> 
  Examples:
    |ID|first|last|birth|
    |53|Sowmya|Krishnamurti|2022-11-01| 


Code Block
curl -X 'POST' \
  'https://gdb.er3.ext.egovstack.net/data/crs/2.9/read' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJHOFhwMFNhUko3U1RBSkJvZGpFSjhVb3FnUXozZTVoQng1SEJXcXhfV3BZIn0.eyJleHAiOjE2Njg3NTcxNDYsImlhdCI6MTY2ODc1Njg0NiwiYXV0aF90aW1lIjoxNjY4NzU0OTk5LCJqdGkiOiI5MDkwYjM0Ny1hMTAxLTQ3ODQtYTFlNy1kZWM4YTdlZGI1NTkiLCJpc3MiOiJodHRwczovL2xvZ2luLmVyMy5leHQuZWdvdnN0YWNrLm5ldC9hdXRoL3JlYWxtcy9DSCIsImF1ZCI6WyJyZWFsbS1tYW5hZ2VtZW50Iiwic3RhdGlzdGljcy1iYWNrZW5kIiwic3RhdGlzdGljcy1mcm9udGVuZCIsImJwYS1iYWNrZW5kIiwiYnBhLWZyb250ZW5kIiwiYWNjb3VudCJdLCJzdWIiOiI2OTY4NzVmNi1iNjI1LTQxYzQtODgzMi1kMjRkZTE0Mzg3YzgiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJnZGItY2xpZW50Iiwic2Vzc2lvbl9zdGF0ZSI6IjkwYjYyYmFkLTExMDctNGQ1Mi05YzRmLWVhMWRlMzE2NzRiNyIsImFjciI6IjEiLCJhbGxv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Kv-JqQLjneAVZvfCo5s0v8KRpZEYsHp6-ryRBjELBgieou7pgeEwEtXwKv3HT1pDgRFdE1Uab2y1tFLrpmkhae7p9QITC7YDNLRfWRuyEtlC5pqK_n-noyTGuCjlx4zfPX2ViNKyQbrCgWtcsEUQBH2Xlelq5Miv6yYqeCG0YYsK44NGK76M0OxwFtZjCAIOQH2_6RbdKi81omE42uAvZDaNICcXfpg1S5bM7n6CdsxTajeFjZYjxwHzCQt6kuXlZ-rEOFLTxtt3wRUVWVhmjKW41drX82ojN69_VE3mzU1gCNqQVCwBTLK6qA' \
  -H 'Content-Type: application/json' \
  -d '{
  "query": {
    "content": {
      "National ID": "53"
      
      
    }
  }
}'

In response, the Govstack IDBB/ Digital Registries BB is expected to return the following:

Code Block
{
  "receive": {
    "content": {
      "ID": "0409CC96-700A-4FB9-A22C-F56DC8A03BC1",
      "Father": {
        "Last names": "",
        "First names": "",
        "National ID": ""
      },
      "Gender": "Female",
      "Mother": {
        "Last names": "Riisikas",
        "First names": "Usha",
        "National ID": "47"
      },
      "Birthdate": "2022-11-01",
      "Full name": "Sowmya Krishnamurti",
      "Last names": "Krishnamurti",
      "First names": "Sowmya",
      "National ID": "53",
      "Nationality": {
        "key": "EST",
        "value": "Estonia"
      },
      "Nationality key": "EST",
      "Nationality value": "Estonia"
    },
    "created_at": "2022-11-18T07:37:34.678816Z",
    "modified_at": "2022-11-18T07:38:00.239776Z",
    "uuid": "6e5ea0ad-c990-40d9-be4b-d152f7ede16f"
  }
}

7. The health worker verifies the details of the mother obtained from the population registry and ascertains the mother’s eligibility for the program.

  1. If the eligibility verification fails, the health worker will inform the mother about the same.

  2. If verification is successful, then the health worker will authorize the MCC application to send a payment collection request, to the Govstack Payment BB passing appropriate details. (this step is not real life scenario and is added for demonstration purposes)

Send a payment collection request - Outbound Txn Request / Gov Initiated P2G API -

Code Block
curl --location --request POST '{{PaymentBBChannelHostName}}/transferRequest' \
--header 'Platform-TenantId: <tenantId which is mapped to payee ID in config>' \
--header 'Content-Type: application/json' \
--header 'X-Date: <dateTime>' \
--header 'X-CorrelationID: <string>' \
--header 'X-API-Key: <string>' \
--header 'X-Client-Id: <string>' \
--header 'X-Content-Hash: <string>' \
--header 'X-Channel: <string>' \
--header 'X-Callback-URL: <uri>' \
--data-raw '{
    "payer": [
        {
            "key": "MSISDN",
            "value": "254708374149"
        },
        {
            "key": "ACCOUNTID",
            "value": "24450523"
        }
    ],
    "amount": {
        "amount": "16",
        "currency": "AED"
    },
    "transactionType": {
        "initiatorType": "GOVERNMENT"
        "scenario": "<MMP Name> Ex:- MPESA",
        "subScenario": "<MMP Payment Mode> Ex:- BUYGOODS",
    }
}'

Response

Code Block
{
 "serverCorrelationId": "<string>",
 "pollLimit": "<int32>",
 }

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 -
GSMA Account Lookup

By Account

Account Status

Code Block
curl --location -g --request GET '{{AccountLookupHostName}}/accounts/{{accountId}}/status' \
--header 'X-Date: <dateTime>' \
--header 'X-API-Key: <string>' \
--header 'X-Client-Id: <string>' \
--header 'X-Content-Hash: <string>' \
--header 'X-Channel: <string>' \
--header 'X-Account-Holding-Institution-Identifier-Type: <string>' \
--header 'X-Account-Holding-Institution-Identifier: <string>' \
--header 'Accept: application/json'

Account Name

Code Block
curl --location -g --request GET '{{AccountLookupHostName}}/accounts/{{accountId}}/accountname' \
--header 'X-Date: <dateTime>' \
--header 'X-API-Key: <string>' \
--header 'X-User-Bearer: <string>' \
--header 'X-Client-Id: <string>' \
--header 'X-Content-Hash: <string>' \
--header 'X-Channel: <string>' \
--header 'X-Account-Holding-Institution-Identifier-Type: <string>' \
--header 'X-Account-Holding-Institution-Identifier: <string>' \
--header 'Accept: application/json'

By Identifier

Account Status

Code Block
curl --location -g --request GET '{{AccountLookupHostName}}/accounts/{{identifierType}}/{{identifier}}/status' \
--header 'X-Date: <dateTime>' \
--header 'X-API-Key: <string>' \
--header 'X-Client-Id: <string>' \
--header 'X-Channel: <string>' \
--header 'X-Account-Holding-Institution-Identifier-Type: <string>' \
--header 'X-Account-Holding-Institution-Identifier: <string>' \
--header 'Accept: application/json'

Account Name

Code Block
curl --location -g --request GET '{{AccountLookupHostName}}/accounts/{{identifierType}}/{{identifier}}/accountname' \
--header 'X-Date: <dateTime>' \
--header 'X-API-Key: <string>' \
--header 'X-Client-Id: <string>' \
--header 'X-Channel: <string>' \
--header 'X-Account-Holding-Institution-Identifier-Type: <string>' \
--header 'X-Account-Holding-Institution-Identifier: <string>' \
--header 'Accept: application/json'

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 -
GSMA MM Outbound Txn Request API  

Code Block
curl --location -g --request POST '{{PaymentBBChannelHostName}}/transactions' \
--header 'X-Date: <dateTime>' \
--header 'X-CorrelationID: <string>' \
--header 'X-API-Key: <string>' \
--header 'X-Client-Id: <string>' \
--header 'X-Content-Hash: <string>' \
--header 'X-Channel: <string>' \
--header 'X-Callback-URL: <uri>' \
--header 'X-Account-Holding-Institution-Identifier-Type: <string>' \
--header 'X-Account-Holding-Institution-Identifier: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
  "requestingOrganisationTransactionReference": "string",
  "originalTransactionReference": "string",
  "subType": "string",
  "type": "transferRequest",
  "amount": "15.21",
  "currency": "AED",
  "descriptionText": "string",
  "fees": [
    {
      "feeType": "string",
      "feeAmount": "0.5",
      "feeCurrency": "AED"
    }
  ],
  "geoCode": "37.423825,-122.082900",
  "oneTimeCode": "string",
  "requestingOrganisation": {
    "requestingOrganisationIdentifierType": "lei",
    "requestingOrganisationIdentifier": "string"
  },
  "servicingIdentity": "string",
  "requestDate": "2022-09-28T12:51:19.260+00:00",
  "customData": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "metadata": [
    {
      "key": "string",
      "value": "string"
    }
  ],
  "creditParty": [
    {
      "key": "accountId",
      "value": "432578219026"
    }
  ],
  "debitParty": [
        {
            "key": "msisdn",
      "value": "+33555987456"
        }
  ]
}'

Sample MM Outbound Transfer Request API (MPesa BuyGoods Confirmation API)

Code Block
curl --location --request POST 'https://sandbox.safaricom.co.ke/mpesa/stkpush/v1/processrequest' \
--header 'Authorization: Bearer <Access-Token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "BusinessShortCode": " ",
    "Password": " ",
    "Timestamp": " ",
    "TransactionType": "CustomerPayBillOnline",
    "Amount": " ",
    "PartyA": " ",
    "PartyB": " ",
    "PhoneNumber": " ",
    "CallBackURL": "https://ip_address:port/callback",
    "AccountReference": " ",
    "TransactionDesc": " "
}'

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 -

Code Block
curl --location -g --request GET '{{ChannelGSMAHostName}}/responses/{{clientOrServerCorrelationId}}' \
--header 'X-Date: <dateTime>' \
--header 'X-API-Key: <string>' \
--header 'X-Client-Id: <string>' \
--header 'X-Content-Hash: <string>' \
--header 'X-Channel: <string>' \
--header 'Accept: application/json'

Success Response Structure

Code Block
{
    "status" : "PENDING / SUCCESS"
    "subStatus" : ""
}

Generic Failure Response Structure

Code Block
{
 "errorCategory": "<string>",
 "errorCode": "<string>",
 "errordescription": "<string>",
 "errorDateTime": "<dateTime>",
 "errorParameters": [
  {
   "key": "<string>",
   "value": "<string>"
  },
  {
   "key": "<string>",
   "value": "<string>"
  }
 ]
}

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:

Code Block
Feature: The health worker submits the registration application form and receives a confirmation (Membership ID) of the successful registration

Scenario Outline: Send form data to Registration CREATE API of MCTS DB.   
Given Sona has entered all required data in the Registration e-service registration form
   When the social health activist named "Sona" pushes a button "Send application"
   Then the MCC system makes a request to Registration BB MCTS DB CREATE API
    And fills the form data field with response information <MCTS ID>
  Examples:
    |MCTS ID|
    |MCTS4|

-<need to identify which API provides the confirmation of successful registration and what is the expected response.>-

Code Block
curl -X 'POST' \
  'https://gdb.er3.ext.egovstack.net/data/mcts/2.0/create' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJHOFhwMFNhUko3U1RBSkJvZGpFSjhVb3FnUXozZTVoQng1SEJXcXhfV3BZIn0.eyJleHAiOjE2Njg3NjE1NDMsImlhdCI6MTY2ODc2MTI0MywiYXV0aF90aW1lIjoxNjY4NzYwNDYzLCJqdGkiOiI4YzI1NTUxNC01YzdhLTRlNDMtOTUxOS1mMjk2MTIwYTdkNDQiLCJpc3MiOiJodHRwczovL2xvZ2luLmVyMy5leHQuZWdvdnN0YWNrLm5ldC9hdXRoL3JlYWxtcy9DSCIsImF1ZCI6WyJyZWFsbS1tYW5hZ2VtZW50Iiwic3RhdGlzdGljcy1iYWNrZW5kIiwic3RhdGlzdGljcy1mcm9udGVuZCIsImJwYS1iYWNrZW5kIiwiYnBhLWZyb250ZW5kIiwiYWNjb3VudCJdLCJzdWIiOiI2OTY4NzVmNi1iNjI1LTQxYzQtODgzMi1kMjRkZTE0Mzg3YzgiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJnZGItY2xpZW50Iiwic2Vzc2lvbl9zdGF0ZSI6ImYyZTA1MDgzLWZlOTktNGY0NS1iYmY1LTM5N2I1MTgyZDA1NSIsImFjciI6IjAiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cHM6Ly9nZGIuZXIzLmV4dC5lZ292c3RhY2submV0Il0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI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BI1IJR5KNJoexJYuhGgAY_2esrUw0gMAIL517VUUWqV-bFfvZ1JLm4UH7IlueeGFlTJeWvNvWABl0HtbZJwB3IrUp5izUIg-uGIDNsSts3EtyY-a13ooPU-a4DGbu0cpn3JdhKSnhONhv78_DqXCW2k__K85zujper_XaVdRRobOz_yHgAEBvqjcER2i9J3l2cY3vy7XnJh4jwcrnYXA' \
  -H 'Content-Type: application/json' \
  -d '{
  "write": {
    "content": {
     
      "Child": {
        "National ID number": "10",
        "First names": "Usha Lee",
        "Last names": "Bajaj",
        "Birthdate": "2021-10-02",
        "Address": "Longroad 123, Welltown, Ethiopia",
        "Nationality": "Finland"
      },
      "Caretaker": {
        "National ID number": "4",
        "First names": "Sowmya",
        "Last names": "Bajaj",
        "Birthdate": "2021-10-03",
        "Phone": "+3725278511",
        "Email": "test@test.et",
        "Nationality": "Estonia",
        "Address": "Longroad 123, Welltown, Ethiopia"
      }
    }
  }
}'

Response

Code Block
{
  "receive": {
    "content": {
      "Child": {
        "National ID number": "10",
        "First names": "Usha Lee",
        "Last names": "Bajaj",
        "Birthdate": "2021-10-02",
        "Address": "Longroad 123, Welltown, Ethiopia",
        "Nationality": "Finland"
      },
      "Caretaker": {
        "National ID number": "4",
        "First names": "Sowmya",
        "Last names": "Bajaj",
        "Birthdate": "2021-10-03",
        "Phone": "+3725278511",
        "Email": "test@test.et",
        "Nationality": "Estonia",
        "Address": "Longroad 123, Welltown, Ethiopia"
      },
      "ID": "MCTS29"
    },
    "created_at": "2022-11-18T08:51:05.055279Z",
    "modified_at": "2022-11-18T08:51:05.055311Z",
    "uuid": "f1114818-c6e1-419c-8492-b46a4ee6bda2"
  }
}

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:

Code Block
Feature: Upon receiving the consent agreement ID from the Consent BB,  the MCC application stores information in Consent DB

Scenario Outline: Send form data to Registration BB CREATE API of CON DB.   
Given System has received Consent ID form Consent BB and stored it in the response field 
   When the MCC application receives Consent ID
   Then the MCC system stores <Consent ID> in the Consent ID field on the form
    And the MCC system makes a request to Registration BB CON DB CREATE API
    And fills the form data field with response information  Consent DB <ID>
  Examples:
    |ID|MCTS ID|Consent ID|
    |CON1|MCTS28|70899ddd-c698-47b5-995a-04de2406efcc|

Code Block
curl -X 'POST' \
  'https://gdb.er3.ext.egovstack.net/data/con/1.1/create' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJHOFhwMFNhUko3U1RBSkJvZGpFSjhVb3FnUXozZTVoQng1SEJXcXhfV3BZIn0.eyJleHAiOjE2NjgyODU0MzUsImlhdCI6MTY2ODI4NTEzNSwiYXV0aF90aW1lIjoxNjY4MjgxNTk5LCJqdGkiOiJmYmFkMzYyNC03ZGQ2LTQwMTItOGVkZi05MjM4NzE0OTYwNDEiLCJpc3MiOiJodHRwczovL2xvZ2luLmVyMy5leHQuZWdvdnN0YWNrLm5ldC9hdXRoL3JlYWxtcy9DSCIsImF1ZCI6WyJyZWFsbS1tYW5hZ2VtZW50Iiwic3RhdGlzdGljcy1iYWNrZW5kIiwic3RhdGlzdGljcy1mcm9udGVuZCIsImJwYS1iYWNrZW5kIiwiYnBhLWZyb250ZW5kIiwiYWNjb3VudCJdLCJzdWIiOiI0M2M1OGJkMC0xZTU3LTQ5M2EtYjhmYi1kYzM4NDAxMjMyNzQiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJnZGItY2xpZW50Iiwic2Vzc2lvbl9zdGF0ZSI6IjAwNDdlZTY2LWY3MmItNDBkNS05MWFkLTU0MTQ3YTFhYTRjM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-GlQqoIFKK6hVedyjUChAnekgmpybD-h-gQ9HmQxLhqWNi1qmRelr2_rQujthvQJZaOuhm-Bx4D5Va8Cn8inyIuDg9CCff51_Jqwpiuea2uNfmrZgFRXkbhVTGo6FwfMY31KYgzl5KQhXJOh033-JPC58luxcnKTkaPTp1ZQd-GX3KSmJ745ENh4JRKRB3Rt0YH5uW8XPkiZV1UWC_5N2roXOvOIHjxZ6tkYlYINkAmjXpXky9qtU_KQYlRoC4n7_QCC_z0VpItGCKQR4QQVb7O407kJHV7O4ON4lzYizBSubtbOPtc6Fn3veihTNiWu4tWu05SgkErP1_A' \
  -H 'Content-Type: application/json' \
  -d '{
  "write": {
    "content": {
      "MCTS ID": "MCTS4",
      "Consent ID": "70899ddd-c698-47b5-995a-04de2406efcc "
    }
  }
}'

Response:

Code Block
{
  "receive": {
    "content": {
      "MCTS ID": "MCTS4",
      "Consent ID": "70899ddd-c698-47b5-995a-04de2406efcc",
      "ID": "CON1"
    },
    "created_at": "2022-11-12T20:35:43.672125Z",
    "modified_at": "2022-11-12T20:35:43.672172Z",
    "uuid": "dd033698-5423-430a-a0ae-0182b40cbf38"
  }
}

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)

  1. If the mother does not possess a national ID, the registration application needs to provide an alternate mechanism for the health worker to verify the details of the mother. GetIdentityProfile - elaborate

  2. If the consent record is previously created and available, the registration application should fetch the consent agreement by invoking the API: “serviceListIndividualRecord” on the Govstack Consent BB

“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)

  • A child can be only registered once in MCC. The system must prevent multiple registrations.

  • If the mother is not registered in Population Registry, then it is not possible to register in MCC.

  • If Identity BB or Consent BB is not available (service outage), then …..

  • If no internet, then the system is not available and information must be collected on paper forms or on offline data capturing devices.

  • If the child is not registered in Population Registry, then the system must enable integrated government service and the child's information must be collected during the same process and forwarded to the correct registration process (Identity BB API to register a new child and issue an ID number for the child).

Related BBs

(working groups related to that particular use case)

Identity BB

Consent BB

Registration BB

Digital Registries BB

Payment BB

...

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