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. Exporting your forms as JSON files
  • 2. Rendering your JSON forms in v1.3
  • 3. Convert your JSON forms to Typescript
  1. General
  2. Releases
  3. v1.2.* to v1.3.* Migration notes

v1.2 to v1.3: Form migration

Previousv1.2.* to v1.3.* Migration notesNextv1.2.1: Release notes

In order to migrate your form configuration from v1.2 to v1.3, you are required to export your forms as JSON and gradually migrate them into Typescript following these instructions. Once you have your forms exported as JSON files you can proceed on your own to complete the steps or alternatively contact us, and we will do the migration for you free of charge.

If you are working on behalf of a government that is considering a national scale implementation of OpenCRVS, we offer to migrate your JSON forms into TypeScript as a free service.

Please send your birth.json and death.json files to us at

Alternatively, if you wish to migrate the files yourself, please follow the steps below.

1. Exporting your forms as JSON files

  1. Ensure that OpenCRVS is running in your local development environment with your existing form configuration for 1.2

  2. Add the following line in the getConfiguredOrDefaultForm function in the following location to log your birth and death form JSON in Chrome's console developer tools:

Location of function:

console.log(JSON.stringify(form))
  1. If you save this file, the client will rebuild and you can log in to OpenCRVS. Open Chrome's developer tools and select the Console tab. You will see the configured forms truncated in JSON. For each truncated JSON, click "Show more" & "Copy" ... You can now paste out the contents into 2 new JSON files "birth.json" & "death.json" like this:

2. Rendering your JSON forms in v1.3

  1. Quit OpenCRVS v1.2 and checkout OpenCRVS v1.3, then run v1.3 in a development environment.

  2. In your v1.3 country configuration repository add the following versionMigrationHandler function and import into the following location and copy your JSON files for each event form into the linked location:

Location of function:

E.G.:

import * as fs from 'fs'

export async function versionMigrationHandler(): Promise<IForms> {
  return {
    version: 'v1.0.0',
    birth: JSON.parse(fs.readFileSync(`./src/form/birth/birth.json`).toString()),
    death: JSON.parse(fs.readFileSync(`./src/form/death/death.json`).toString()),
    marriage: decorateFormsWithAddresses(marriageForm, Event.Marriage)
  }
}
  1. In the v1.3 country configuration repository temporarily direct the form API route handler to your new function.

Location of change:

E.G.:

server.route({
    method: 'GET',
    path: '/forms',
    /*handler: formHandler,*/
    handler: versionMigrationHandler,
    options: {
      tags: ['api'],
      description: 'Serves form configuration'
    }
  })
  1. When you login to OpenCRVS v1.3 in development mode, you will notice the following warnings ...

In OpenCRVS v1.2, full individual addresses were not able to be added onto certificates, only the district or place of birth. In OpenCRVS v1.3 all address fields can be individually placed on a certificate. Therefore all certificate handlebars for addresses are required to be unique. This warning informs you that the OpenCRVS v1.2 address handlebars are not unique and must be replaced.

  1. Open your forms and search for the place of event address fields such as placeOfBirth and placeOfDeath.

  1. You are going to delete all the field objects for the addresses. Before you do so, take note of the field name or (if available) customQuestionMappingId property for the immediately proceeding field.

  1. Now select and delete all address fields. In most cases the final field in the address configuration will be the end of the international or secondary address fields.

Select all address fields
After deletion
  1. In OpenCRVS v1.3 some extra components have been introduced to have more visual control over the form. As a result some previous components have been deprecated or renamed. One such component is SUBSECTION, now referred to as a DIVIDER. Find and delete any such fields. Refer to the new configuration notes in order to understand how to use the new fields.

  1. In OpenCRVS v1.2 it was not possible to edit the first 3 pages of the event form such as the introduction text, the informant type and the informant contact details. Our design reasoning was that these fields were essential required pages. But we received quite a lot of requests to move those form fields to different pages. Therefore you are now required to replace the registration, introduction and informant sections in your form with the sections in OpenCRVS v1.3. Add the following lines in your versionMigrationHandler function in order to output the sections as JSON into the console:

If you save and reload OpenCRVS, the JSON will output into your terminal console so that you can copy it and replace the sections in your birth.json and death.json:

Paste the registration and introduction section over your existing registration section.

Paste the informant section over your existing informant section.

Location of registration section
Location of informant section
  1. In OpenCRVS v1.3, we have renamed some mapping functions which take a field value and convert it to and from GraphQL on form submission. When you convert your JSON form into typescript, you will not need to care about these functions as we have abstracted them away, but in order for your form to render you need to replace the document upload mapping function names. Search for birthFieldToAttachmentTransformer and replace with the name eventFieldToAttachmentTransformer, then search for birthAttachmentToFieldTransformer and replace with the name eventAttachmentToFieldTransformer:

  1. Now if you save your JSON files, you can decorate the JSON with the address fields by using the following wrapper decorateFormsWithAddresses function:

  1. Repeat steps 8 to 16 for the death.json file. Once saved you can refresh OpenCRVS and your birth and death forms will render in v1.3 successfully.

3. Convert your JSON forms to Typescript

You can now decide to proceed independently, or if your government is considering a national scale implementation of OpenCRVS, email these files to us at and we can perform the work for you to help you migrate to Typescript.

In OpenCRVS v1.3 address fields are dynamically decorated into the form in multiple places. You can configure individual address fields by editing the functions in and the vertical position of where the addresses should be rendered by amending the preceedingFieldId property in each case in

Paste in the preceedingFieldId property we referenced earlier for the place of birth address :

You can repeat the process for the address fields associated with parents and informants, by searching for the primaryAddress field in the birth.json. Delete all the fields appropriately and amend the preceedingFieldId in the above as you performed for place of birth.

Now that your forms are rendering, you can follow the to gradually convert your form JSON into TypeScript.

team@opencrvs.org
opencrvs-countryconfig/src/form/index.ts
opencrvs-countryconfig/src/index.ts
this file
this file.
here
configuration file
opencrvs-countryconfig/src/form/index.ts
form configuration instructions
team@opencrvs.org
opencrvs-core/packages/client/src/forms/configuration/index.ts (add on line 299)
Validation of a form configuration