The role of the Escape procedures is to allow adaptation of the Web Application to different insurance contexts. There are situated in a single class, EscapeBL, which makes it easier to access and modify without having to worry about messing with the whole Web Application source code. To modify the escape procedure, first download the source code from Github Web Application repository. Within the solution, go to IMIS_BL folder and open the EscapeBL.vb file.
There are 2 escape procedures that can be modified:
isValidInsuranceNumber allows validating the insuree number based on predefined rules. It is used, for example, when a new family or insuree are enrolled in openIMIS to ensure insuree number validity and to prevent typing errors.
SendSMS allows sending SMS messages through a specific SMS Gateway. It is used, for example, in Web Application Policy Renewal form to send the renewal SMS message to the family.
In this guide, we will localise the isValidInsuranceNumber method.
This is the generic implementation of the method:
The generic method is returning always true, meaning any insuree number will be a valid one.
Let's take for example the following insuree number requirements:
The insuree number must follow the modulo 9 rule: the last digit is the modulo 9 of the number without the last digit
The insuree number must have 10 digits ('0' at the beginning must be saved)
These requirements are satisfied by the following escape procedure:
The isValidInsuranceNumber is executing the following steps:
validates the length of the insuree number (line 2)
splits the insuree number into number and modulo parts (lines 3 and 4)
validates the insuree number if the modulo part is equal to the modulo result (line 5)
all other cases are invalidated (line 6)
Other validations rules can be applied.
To apply the new modification to the escape procedures, the Web Application .Net solution needs to be published and deployed.
Parameters
Returns
InsuranceNumber String the insuree number to validate
Boolean true if the insuree number is valid, otherwise, false
If you want to localise openIMIS Web Application component, you will need first to download the source code for the Web Application from Github.
The .NET Web Application has been developed to be used in different insurance contexts and with the idea of minimal adaptations. Most of the localisation can be realized through database change. However, there are some specific requirements that will have to change the Web Application's source code.
In the previous sections, we have seen how to update the escape procedures and to add new language translation. In this section, we will publish the new customised Web Application in a folder and deploy it over the previously installed generic version.
For detailed documentation on publishing using Visual Studio, visit the how to deploy to a local folder webpage.
Open in Visual Studio the Web Application .Net solution updated in the previous steps.
In Solution Explorer, right-click the IMIS project and choose Publish
(or use the Build
> Publish
menu item).
The default target location is the publish
folder under the Web Application solution folder. If you wish to change the target location then you just edit the configuration.
Press the Publish
button.
To deploy the localized Web Application published in the previous section, please follow the same steps from Web Application installation steps.
To deploy the Web Application as a new site, follow the steps from the Configure IIS section. You will need to change the binding ports or map different DNS as hostname.
To upgrade an existing Web Application site, replace existing files with the files from the published Web Application.
Please make sure to:
not replace/remove Archive, Extracts, FromPhone, Images, and Workspace folders to prevent losing previous work
update IMISConnectionString in Web.config file
you don't need to edit permissions to Windows event logs again
Web Application .Net is supporting up to two languages. The language translation is done on the Web Application source code level (this page) and on the database level (see WA4.1 Language selection and translation tables).
The Web Application language localisation is using the default ASP.Net Globalization and Culture configuration. The translation is based on resource files. The generic application is translated into English-language and French-language.
In order to facilitate the translation of the Web Application and to have a common repository for language packs for openIMIS, we have subscribed to lokalise.com. If you wish to add new languages to openIMIS Web Application, you can request the access by visiting the Web Application project on lokalise. For more information on the translation platform please check Translation Management platform page.
From the Web Application project press the +
button to add a new language.
From the Add languages
modal select the language to add. You can filter the languages by writing in the input field. In this example, we will choose French (Cameroon). Multiple languages can be added at once.
Click the Add button.
From the Web Application project press the Glossary
button to add a new language.
For each glossary term, translate in the new added language.
For each term in the Web Application project, translate it in the new language.
From the Web Application project press the Download
button.
Select the language you want to download and the different download settings.
Press Build and download
button. This will download a ZIP file with resource files for all selected languages. Unzip the file in a local folder.
Open in Visual Studio the Web Application .Net solution downloaded from Github.
In the Solution Explorer
window, navigate to IMIS project
→ App_GlobalResources
folder and open the contextual menu with right-click.
Select Add → Existing Item...
.
Select the resource file for the new language and press Add.
This will copy the file to the App_GlobalResources
folder and add it to the project.
(Optional) you can check the new language by opening the resource file.
To use the new language, the Web Application .Net solution needs to be published and deployed. Nevertheless, you cannot use the new language unless you update the language selection and translation tables in the database.
Because there is multiple truth and it is often complex and can change over time, the terminology must have the same meaning and same wording in the whole Web Application. It is also important that the country-specific names are validated by the country implementing openIMIS.
When using a glossary you ensure that you will use the same 'truth' across your application. In the case of lokalise, every time it will detect the glossary term, it will show the definition and the translation, allowing to be consistent in the translation package.
For example, in Tchad there are the different organisation names which must be adapted in openIMIS:
openIMIS default name
Tchad official old name
Tchad official new name
Tchad health zones
Regions
Région
Province
Délégation Sanitaire Provinciale
District
Prefecture
Département
District sanitaires
Municipality
Sous-préfecture
Commune
Zone de résponsabilité
Village
Village
Village
Village