/
Vouchers at PSI

Vouchers at PSI

PSI use the concepts of vouchers to track referrals issued to clients for the purpose of tracking uptake of product and services.

Voucher number characteristics

  • 6 characters in length (letters and digits)

  • Letters are all capitals

  • Unique code: First 5 characters are generated from time based formula

    • value is converted to a base34 [0~9, A~X] (34 digit),

    • ‘I' & ‘O’ (capital o) are then converted to ‘Y’ & 'Z’.

  • Last 1 character is a control character, calculated by summing the first 5 characters, and then taking the remainder. It is use to validate client-size (including online) a valid voucher number.

Voucher backend generation

Every 24h a cron job + node.js, fills the pool of draft ServiceResquest Ids to 10,000.

All generated vouchers are marked with status “draft

Voucher operations

Issuing/ online applications

Online applications: bot or website request a voucher to issue to online client

  • status FHIR server: draft → active (issued)

Issuing/ offline apps

an application ask for N number of voucher to replenish it local pool (about 150)

  • status main fhir server: draft → on-hold

Voucher issuing (offline)

  • status local FHIR : on-hold → active

  • after sync, status main fhir server: on-hold → active

Redeem of voucher (online of offline)

  • voucher status updated: active → completed

FHIR representation

ServiceRequest - FHIR

Sample Resources

FHIR resource status

  • draft” - Generated by the cron job.

  • on-hold” - Practitioner (using WFA App) takes vouchers and hold them in pool.

  • active” - Voucher issued to a Patient.

  • completed” - Voucher redeemed.

DRAFT

{
    "resourceType": "ServiceRequest",
    "id": "144235",
    "meta": {
        "versionId": "1",
        "lastUpdated": "2023-07-12T06:12:48.645+00:00",
        "source": "#pOsuiFSdYdvNq6of",
        "profile": [ "SRH_HIV-SWZ" ]
    },
    "identifier": [
        {
            "system": "http://sample.info/voucher-seq-no",
            "value": "208078"
        }
    ],
    "status": "draft",
    "intent": "proposal",
    "code": {
        "coding": [
            {
                "system": "http://sample.info/voucher-code",
                "code": "059XWB"
            }
        ]
    }
}

DRAFT

{
    "resourceType": "ServiceRequest",
    "id": "144235",
    "meta": {
        "versionId": "1",
        "lastUpdated": "2023-07-12T06:12:48.645+00:00",
        "source": "#pOsuiFSdYdvNq6of",
        "profile": [ "SRH_HIV-SWZ" ]
    },
    "identifier": [
        {
            "system": "http://sample.info/voucher-seq-no",
            "value": "208078"
        }
    ],
    "status": "draft",
    "intent": "proposal",
    "code": {
        "coding": [
            {
                "system": "http://sample.info/voucher-code",
                "code": "059XWB"
            }
        ]
    }
}

ON-HOLD

{
    "resourceType": "ServiceRequest",
    "id": "144235",
    "meta": {
        "versionId": "2",
        "lastUpdated": "2023-07-12T08:12:48.645+00:00",
        "source": "#pOsuiFSdYdvNq6of",
        "profile": [ "SRH_HIV-SWZ" ]
    },
    "identifier": [
        {
            "system": "http://sample.info/voucher-seq-no",
            "value": "208078"
        }
    ],
    "status": "on-hold",
    "intent": "proposal",
    "code": {
        "coding": [
            {
                "system": "http://sample.info/voucher-code",
                "code": "059XWB"
            }
        ]
    },
    "occurrenceDateTime": "2023-07-06T10:27:38.883Z",
"requester": { "reference": "Practitioner/554" }
}

ACTIVE

{
    "resourceType": "ServiceRequest",
    "id": "144235",
    "meta": {
        "versionId": "2",
        "lastUpdated": "2023-07-12T08:12:48.645+00:00",
        "source": "#pOsuiFSdYdvNq6of",
        "profile": [ "SRH_HIV-SWZ" ]
    },
    "identifier": [
        {
            "system": "http://sample.info/voucher-seq-no",
            "value": "208078"
        }
    ],
    "status": "active",
    "intent": "proposal",
    "code": {
        "coding": [
            {
                "system": "http://sample.info/voucher-code",
                "code": "059XWB"
            }
        ]
    },
    "occurrenceDateTime": "2023-07-06T10:27:38.883Z",
"requester": { "reference": "Practitioner/554" },
    "subject": { "reference": "Patient/140895" }
}

COMPLETED

{
    "resourceType": "ServiceRequest",
    "id": "144235",
    "meta": {
        "versionId": "2",
        "lastUpdated": "2023-07-12T08:12:48.645+00:00",
        "source": "#pOsuiFSdYdvNq6of",
        "profile": [ "SRH_HIV-SWZ" ]
    },
    "identifier": [
        {
            "system": "http://sample.info/voucher-seq-no",
            "value": "208078"
        }
    ],
    "status": "completed",
    "intent": "proposal",
    "code": {
        "coding": [
            {
                "system": "http://sample.info/voucher-code",
                "code": "059XWB"
            }
        ]
    },
    "occurrenceDateTime": "2023-07-06T10:27:38.883Z",
"requester": { "reference": "Practitioner/554" },
    "subject": {  "reference": "Patient/140895"  }
}

Related content