OpenCRVS
v1.4
v1.4
  • 👋Welcome!
  • CRVS Systems
    • Understanding CRVS
    • Effective digital CRVS systems
    • OpenCRVS within a government systems architecture
    • OpenCRVS Value Proposition
  • Product Specifications
    • Functional Architecture
    • Workflow management
    • Status Flow Diagram
    • Users
      • Examples
    • Core functions
      • 1. Notify event
      • 2. Declare event
      • 3. Validate event
      • 4. Register event
      • 5. Print certificate
      • 6. Issue certificate
      • 7. Search for a record
      • 8. View record
      • 9. Correct record
      • 10. Verify record
      • 11. Archive record
      • 12. Vital statistics export
    • Support functions
      • 13. Login
      • 14. Audit
      • 15. Deduplication
      • 16. Performance management
      • 17. Payment
      • 18. Learning
      • 19. User support
      • 20. User onboarding
    • Admin functions
      • 21. User management
      • 22. Comms management
      • 23. Content management
      • 24. Config management
    • Data functions
      • 25. Legacy data import
      • 26. Legacy paper import
  • Technology
    • Architecture
      • Performance tests
    • Standards
      • FHIR Documents
        • Event Composition
        • Person
        • Registration Task
        • Event Observations
        • Locations
    • Security
    • Interoperability
      • Create a client
      • Authenticate a client
      • Event Notification clients
      • Record Search clients
      • Webhook clients
      • National ID client
      • FHIR Location REST API
      • Other ways to interoperate
  • Default configuration
    • Intro to Farajaland
    • Civil registration in Farajaland
    • OpenCRVS configuration in Farajaland
      • Application settings
      • User / role mapping
      • Declaration forms
      • Certificate templates
    • Business process flows in Farajaland
  • Setup
    • 1. Planning an OpenCRVS Implementation
    • 2. Establish project and team
    • 3. Gather requirements
      • 3.1 Mapping business processes
      • 3.2 Mapping offices and user types
      • 3.3 Define your application settings
      • 3.4 Designing event declaration forms
      • 3.5 Designing a certificate template
    • 4. Installation
      • 4.1 Set-up a local development environment
        • 4.1.1 Install the required dependencies
        • 4.1.2 Install OpenCRVS locally
        • 4.1.3 Starting and stopping OpenCRVS
        • 4.1.4 Log in to OpenCRVS locally
        • 4.1.5 Tooling
          • 4.1.5.1 WSL support
      • 4.2 Set-up your own, local, country configuration
        • 4.2.1 Fork your own country configuration repository
        • 4.2.2 Set up administrative address divisions
          • 4.2.2.1 Prepare source file for administrative structure
          • 4.2.2.2 Prepare source file for statistics
        • 4.2.3 Set up CR offices and Health facilities
          • 4.2.3.1 Prepare source file for CRVS Office facilities
          • 4.2.3.2 Prepare source file for health facilities
        • 4.2.4 Set up employees & roles for testing or production
          • 4.2.3.1 Prepare source file for employees
          • 4.2.3.2 Configure role titles
        • 4.2.5 Set up application settings
          • 4.2.5.1 Managing language content
            • 4.2.5.1.1 Informant and staff notifications
          • 4.2.5.2 Configuring Metabase Dashboards
        • 4.2.6 Configure certificate templates
        • 4.2.7 Configure declaration forms
          • 4.2.7.1 Configuring an event form
        • 4.2.8 Seeding & clearing your local databases
        • 4.2.9 Countryconfig API endpoints explained
      • 4.3 Set-up a server-hosted environment
        • 4.3.1 Verify servers & create a "provision" user
        • 4.3.2 HTTPS & Networking
        • 4.3.3 Create a Github environment
          • 4.3.3.1 Environment secrets and variables explained
        • 4.3.4 Provision environments
          • 4.3.4.1 Building, pushing & releasing your countryconfig code
        • 4.3.5 Deploy
    • 5. Functional configuration
      • 5.1 Configure application settings
      • 5.2 Configure registration periods and fees
      • 5.3 Managing system users
    • 6. Quality assurance testing
    • 7. Go-live
      • 7.1 Pre-Deployment Checklist
    • 8. Operational Support
    • 9. Monitoring
      • 9.1 Application logs
      • 9.2 Infrastructure health
      • 9.3 Routine monitoring checklist
      • 9.4 Setting up alerts
      • 9.5 Managing a Docker Swarm
  • General
    • Community
    • Contributing
    • Releases
      • v1.4.1: Release notes
      • v1.4.0 to v1.4.1 Migration notes
      • v1.4.0 Release notes
      • v1.3.* to v1.4.* Migration notes
      • v1.3.5: Release notes
      • v1.3.4: Release notes
      • v1.3.3: Release notes
      • v1.3.1: Release notes
      • v1.3.* to v1.3.* Migration notes
      • v1.3.0: Release notes
      • v1.2.* to v1.3.* Migration notes
        • v1.2 to v1.3: Form migration
      • v1.2.1: Release notes
      • Patch: Elasticsearch 7.10.2
      • v1.2.0: Release notes
      • v1.1.* to v1.2.* Migration notes
      • v.1.1.2: Release notes
      • v.1.1.1: Release notes
      • v1.1.0: Release notes
    • Interoperability roadmap
    • Product roadmap
Powered by GitBook
On this page
  1. Technology
  2. Interoperability

Event Notification clients

Submitting full or partial event applications into OpenCRVS from an external service such as a health institution or public portal.

PreviousAuthenticate a clientNextRecord Search clients

An Event Notification client can submit full or partial birth or death applications into an OpenCRVS' office "In Progress" or "Ready For Review" workqueue. Usually these clients are Hospitals, but technically these clients could be any system and the "Health system" label on the workqueue tab could be content managed accordingly.

When Event Notifications are received in OpenCRVS, they are audited accordingly as being received from one of your automated clients.

Submitting an Event Notification

Event Notification Requests

  POST https://gateway.<your_domain>/notification
  Content-Type: application/json
  Authorization: Bearer {{token}}
  
  {
    "resourceType": "Bundle",
    "type": "document",
    "meta": {
        "lastUpdated": "2022-08-14T14:43:47.000Z"
    },
    "entry": [
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "identifier": {
                    "system": "urn:ietf:rfc:3986",
                    "value": "{{uuid}}"
                },
                "resourceType": "Composition",
                "status": "final",
                "type": {
                    "coding": [
                        {
                            "system": "http://opencrvs.org/doc-types",
                            "code": "birth-notification"
                        }
                    ],
                    "text": "Birth Notification"
                },
                "class": {
                    "coding": [
                        {
                            "system": "http://opencrvs.org/specs/classes",
                            "code": "crvs-document"
                        }
                    ],
                    "text": "CRVS Document"
                },
                "subject": {
                    "reference": "urn:uuid:{{uuid}}"
                },
                "date": "2022-08-14T14:43:47.000Z",
                "author": [],
                "title": "Birth Notification",
                "section": [
                    {
                        "title": "Child details",
                        "code": {
                            "coding": [
                                {
                                    "system": "http://opencrvs.org/specs/sections",
                                    "code": "child-details"
                                }
                            ],
                            "text": "Child details"
                        },
                        "entry": [
                            {
                                "reference": "urn:uuid:{{uuid}}"
                            }
                        ]
                    },
                    {
                        "title": "Birth encounter",
                        "code": {
                            "coding": [
                                {
                                    "system": "http://opencrvs.org/specs/sections",
                                    "code": "birth-encounter"
                                }
                            ],
                            "text": "Birth encounter"
                        },
                        "entry": [
                            {
                                "reference": "urn:uuid:{{uuid}}"
                            }
                        ]
                    },
                    {
                        "title": "Mother's details",
                        "code": {
                            "coding": [
                                {
                                    "system": "http://opencrvs.org/specs/sections",
                                    "code": "mother-details"
                                }
                            ],
                            "text": "Mother's details"
                        },
                        "entry": [
                            {
                                "reference": "urn:uuid:{{uuid}}"
                            }
                        ]
                    },
                    {
                        "title": "Informant's details",
                        "code": {
                            "coding": [
                                {
                                    "system": "http://opencrvs.org/specs/sections",
                                    "code": "informant-details"
                                }
                            ],
                            "text": "Informant's details"
                        },
                        "entry": [
                            {
                                "reference": "urn:uuid:{{uuid}}"
                            }
                        ]
                    },
                    {
                        "title": "Father's details",
                        "code": {
                            "coding": [
                                {
                                    "system": "http://opencrvs.org/doc-sections",
                                    "code": "father-details"
                                }
                            ],
                            "text": "Father's details"
                        },
                        "entry": [
                            {
                                "reference": "urn:uuid:{{uuid}}"
                            }
                        ]
                    }
                ]
            }
        },
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "resourceType": "Task",
                "status": "draft",
                "intent": "unknown",
                "identifier": [],
                "code": {
                    "coding": [
                        {
                            "system": "http://opencrvs.org/specs/types",
                            "code": "BIRTH"
                        }
                    ]
                },
                "focus": {
                    "reference": "urn:uuid:{{uuid}}"
                },
                "extension": [
                    {
                        "url": "http://opencrvs.org/specs/extension/contact-person",
                        "valueString": "MOTHER"
                    },
                    {
                        "url": "http://opencrvs.org/specs/extension/contact-person-phone-number",
                        "valueString": "+260759205190"
                    },
                    {
                        "url": "http://opencrvs.org/specs/extension/timeLoggedMS",
                        "valueInteger": 0
                    },
                    {
                        "url": "http://opencrvs.org/specs/extension/in-complete-fields",
                        "valueString": "N/A"
                    },
                    {
                        "url": "http://opencrvs.org/specs/extension/regLastLocation",
                        "valueReference": {
                            "reference": "Location/{{officeLocationId}}"
                        }
                    },
                    {
                        "url": "http://opencrvs.org/specs/extension/regLastOffice",
                        "valueReference": {
                            "reference": "Location/{{officeId}}"
                        }
                    }
                ]
            }
        },
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "resourceType": "Patient",
                "active": true,
                "name": [
                    {
                        "use": "en",
                        "family": [
                            "Tatke"
                        ],
                        "given": [
                            "Harney"
                        ]
                    }
                ],
                "gender": "male",
                "birthDate": "2022-06-29",
                "deceasedBoolean": false,
                "multipleBirthBoolean": false
            }
        },
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "resourceType": "Patient",
                "active": true,
                "identifier": [
                    {
                        "use": "official",
                        "type": "NATIONAL_ID",
                        "value": "3624667568"
                    }
                ],
                "name": [
                    {
                        "use": "en",
                        "family": [
                            "Ratke"
                        ],
                        "given": [
                            "Mom"
                        ]
                    }
                ],
                "gender": "female",
                "telecom": [
                    {
                        "use": "mobile",
                        "system": "phone",
                        "value": "+260759205190"
                    }
                ],
                "birthDate": "2002-06-29",
                "deceasedBoolean": false,
                "multipleBirthInteger": 2,
                "maritalStatus": {
                    "coding": [
                        {
                            "system": "http://hl7.org/fhir/StructureDefinition/marital-status",
                            "code": "M"
                        }
                    ],
                    "text": "MARRIED"
                },
                "address": [
                    {
                        "type": "PRIMARY_ADDRESS",
                        "line": [
                            "12",
                            "Usual Street",
                            "Usual Residental Area",
                            "",
                            "",
                            "URBAN"
                        ],
                        "city": "Meghanland",
                        "district": "{{districtId}}",
                        "state": "{{stateId}}",
                        "postalCode": "52275",
                        "country": "{{countryCode}}"
                    }
                ],
                "extension": [
                    {
                        "url": "http://opencrvs.org/specs/extension/patient-occupation",
                        "valueString": "Housewife"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/patient-nationality",
                        "extension": [
                            {
                                "url": "code",
                                "valueCodeableConcept": {
                                    "coding": [
                                        {
                                            "system": "urn:iso:std:iso:3166",
                                            "code": "{{countryCode}}"
                                        }
                                    ]
                                }
                            },
                            {
                                "url": "period",
                                "valuePeriod": {
                                    "start": "",
                                    "end": ""
                                }
                            }
                        ]
                    },
                    {
                        "url": "http://opencrvs.org/specs/extension/educational-attainment",
                        "valueString": "POST_SECONDARY_ISCED_4"
                    }
                ]
            }
        },
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "resourceType": "RelatedPerson",
                "relationship": {
                    "coding": [
                        {
                            "system": "http://hl7.org/fhir/ValueSet/relatedperson-relationshiptype",
                            "code": "MOTHER"
                        }
                    ]
                },
                "patient": {
                    "reference": "urn:uuid:{{uuid}}"
                }
            }
        },
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "resourceType": "Patient",
                "active": true,
                "identifier": [
                    {
                        "use": "official",
                        "type": "NATIONAL_ID",
                        "value": "6848901132"
                    }
                ],
                "name": [
                    {
                        "use": "en",
                        "family": [
                            "Ratke"
                        ],
                        "given": [
                            "Dad"
                        ]
                    }
                ],
                "gender": "male",
                "telecom": [
                    {
                        "use": "mobile",
                        "system": "phone",
                        "value": "+260759205190"
                    }
                ],
                "birthDate": "2002-06-29",
                "deceasedBoolean": false,
                "multipleBirthInteger": 2,
                "maritalStatus": {
                    "coding": [
                        {
                            "system": "http://hl7.org/fhir/StructureDefinition/marital-status",
                            "code": "M"
                        }
                    ],
                    "text": "MARRIED"
                },
                "address": [
                    {
                        "type": "PRIMARY_ADDRESS",
                        "line": [
                            "12",
                            "Usual Street",
                            "Usual Residental Area",
                            "",
                            "",
                            "URBAN"
                        ],
                        "city": "Madgeland",
                        "district": "{{districtId}}",
                        "state": "{{stateId}}",
                        "postalCode": "52275",
                        "country": "{{countryCode}}"
                    }
                ],
                "extension": [
                    {
                        "url": "http://opencrvs.org/specs/extension/patient-occupation",
                        "valueString": "Businessman"
                    },
                    {
                        "url": "http://hl7.org/fhir/StructureDefinition/patient-nationality",
                        "extension": [
                            {
                                "url": "code",
                                "valueCodeableConcept": {
                                    "coding": [
                                        {
                                            "system": "urn:iso:std:iso:3166",
                                            "code": "FAR"
                                        }
                                    ]
                                }
                            },
                            {
                                "url": "period",
                                "valuePeriod": {
                                    "start": "",
                                    "end": ""
                                }
                            }
                        ]
                    },
                    {
                        "url": "http://opencrvs.org/specs/extension/educational-attainment",
                        "valueString": "POST_SECONDARY_ISCED_4"
                    }
                ]
            }
        },
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "resourceType": "Encounter",
                "status": "finished",
                "location": [
                    {
                        "location": {
                            "reference": "Location/{{facilityId}}"
                        }
                    }
                ]
            }
        },
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "resourceType": "Observation",
                "status": "final",
                "context": {
                    "reference": "urn:uuid:{{uuid}}"
                },
                "category": [
                    {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/observation-category",
                                "code": "procedure",
                                "display": "Procedure"
                            }
                        ]
                    }
                ],
                "code": {
                    "coding": [
                        {
                            "system": "http://loinc.org",
                            "code": "57722-1",
                            "display": "Birth plurality of Pregnancy"
                        }
                    ]
                },
                "valueQuantity": {
                    "value": "SINGLE"
                }
            }
        },
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "resourceType": "Observation",
                "status": "final",
                "context": {
                    "reference": "urn:uuid:{{uuid}}"
                },
                "category": [
                    {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/observation-category",
                                "code": "vital-signs",
                                "display": "Vital Signs"
                            }
                        ]
                    }
                ],
                "code": {
                    "coding": [
                        {
                            "system": "http://loinc.org",
                            "code": "3141-9",
                            "display": "Body weight Measured"
                        }
                    ]
                },
                "valueQuantity": {
                    "value": 4,
                    "unit": "kg",
                    "system": "http://unitsofmeasure.org",
                    "code": "kg"
                }
            }
        },
        {
            "fullUrl": "urn:uuid:{{uuid}}",
            "resource": {
                "resourceType": "Observation",
                "status": "final",
                "context": {
                    "reference": "urn:uuid:{{uuid}}"
                },
                "category": [
                    {
                        "coding": [
                            {
                                "system": "http://hl7.org/fhir/observation-category",
                                "code": "procedure",
                                "display": "Procedure"
                            }
                        ]
                    }
                ],
                "code": {
                    "coding": [
                        {
                            "system": "http://loinc.org",
                            "code": "73764-3",
                            "display": "Birth attendant title"
                        }
                    ]
                },
                "valueString": "PHYSICIAN"
            }
        }
    ]
}
Parameter
Description

Event Notification Response

If the notification has been successfully processed by OpenCRVS, you will receive a 200 OK response and the following payload back. For each successfully saved FHIR resource, you will receive a location.

If the request fails, you will receive a 500 Error and you must check the payload you are sending for errors.

{
    "resourceType": "Bundle",
    "entry": [
        {
            "response": {
                "status": "201",
                "location": "/fhir/Composition/727efd99-4b1a-4c67-8ae0-91003a09170d/_history/533ad880-ba9d-4426-9ad5-ab3ad79180d8"
            }
        },
        {
            "response": {
                "status": "201",
                "location": "/fhir/Task/f444833b-4b96-44cb-bf9c-370ddaa411ed/_history/be3b22f6-97eb-4aac-bee9-bb8bd8ce57aa"
            }
        },
        {
            "response": {
                "status": "201",
                "location": "/fhir/Patient/b85c716b-16b3-4d1f-93bf-d46f4182f9e3/_history/06e0e369-4f41-4c33-9cbb-56093ea9c135"
            }
        },
        {
            "response": {
                "status": "201",
                "location": "/fhir/Patient/c4e7ba36-36ad-4708-9925-6e5e00a140f8/_history/dece69d4-c4a7-4ebf-87f2-11e8f3862348"
            }
        },
        {
            "response": {
                "status": "201",
                "location": "/fhir/RelatedPerson/455517a9-ce05-404d-993d-1faaf852621c/_history/75d7b6b6-488e-48a9-87dc-29d21aca5735"
            }
        },
        {
            "response": {
                "status": "201",
                "location": "/fhir/Patient/bfa19fde-6305-441d-80c3-fcccb62e6cc4/_history/a80d5adc-2a2c-4c87-8bd5-69c35c2efdf3"
            }
        },
        {
            "response": {
                "status": "201",
                "location": "/fhir/Encounter/b644f0b7-1f49-4e0d-88b4-b4196ae65f65/_history/bde7a831-75a3-4456-9e32-af765bf14ad5"
            }
        }
    ],
    "type": "transaction-response"
}

You can use our to test Event Notification API functionality. is a tool you can download to test API access before building your integrations.

To submit an Event Notification, your client must first request an using your client_id and client_secret.

With the token as an authorization header, the following request will submit a minimal birth declaration in . To learn more about our FHIR standard, read the section.

Parameters in handlebars must be substituted with specific data that requires further explanation below. Other data is given as an example, but you can refer to our to set the values correctly depending on the birth or death.

Refer to our to see a payload for a full birth declaration, minimal and full death declaration.

An

This is an important parameter. It is a FHIR Location uuid for a Civil Registration Office that you wish this notification to arrive in the jurisdiction / workqueue of. You can retrieve these ids using our open . Your offices are customised for your country needs in

This is an important parameter. It is a FHIR Location uuid for the immediate administrative level parent, such as a district or state, that the office is partOf. You can retrieve these ids using our open . Your location levels are customised for your country needs in

If you are submitting addresses, then this is an optional FHIR Location uuid for the locationLevel2, technically expressed as a "district". You can retrieve these ids using our open . Your location levels are customised for your country needs in

If you are submitting addresses, then this is an optional FHIR Location uuid for the locationLevel1, technically expressed as a "state". You can retrieve these ids using our open . Your location levels are customised for your country needs in

A FHIR Location id for a facility that is already in the OpenCRVS database to track places of births or deaths in health institutions. You can retrieve these ids using our open . Your health facilities are customised for your country needs in

The for the address. E.G. UGD for Uganda, FAR for our fictional country Farajaland.

token
officeId
officeLocationId
districtId
stateId
facilityId
countryCode
Postman collections
Postman
authorization token
FHIR
standards
standards
Postman collections
authorization token
Location API
this step.
Location API
this step.
Location API
this step.
Location API
this step.
Location API
this step.
Alpha-3 country code
An Event Notification in the OpenCRVS In Progress view
Record Audit view for an Event Notification