Using XML File Extensions to Develop a Custom Import Module

The client of vteam #614 has a multi-tenant (SAAS based) system known as ePCRElectronic Patient Care Reporting. It deals with the collection of patient information data either by adding it manually or using import module. The import module objective is to import valuable information from the relevant legacy system in a standardized XML format.

In the SAAS environment, there exists a great chance of data loss either using manual approach or import module. Reason being that multiple administrators (users) will be accessing this system on parallel basis. Therefore, memory and resource (s) utilization needs to be optimized in an efficient way to achieve optimal performance (while collecting information).

Additionally, the isolation of each tenant’s data needs to be ensured. Reason being that other common import modules do not guarantee about the data loss during their import process.

Solution

Using XML extensions, vteams engineer Naeem Mushtaq efficiently developed a specialized import module for the ePCR system to obtain the desired output (for a SAAS based environment).

The newly developed unique data import wizard consisted of the following three major steps:

1– XML File Uploading

Before uploading the XML files, their format, up-loadable size and standardized content must be validated. The system would then generate relevant error notifications against each false validation on user’s screen.

The import wizard would then rename the uploaded files in a way by which only the files of that particular tenant would go through further steps of the import process.

Once the files were uploaded successfully, the wizard would take the user to the next step.

2– XML File Splitting

In this step, the wizard would then get the particular Tenant’s uploaded files (with modified names) and divide them into multiple chunks of equal size (by ensuring the distribution of files containing the correct parent XML sliced elements). It means that if a file is split into 10 chunks, then automatically it will manage the file slicing in a way that the parent nodes/elements are not broken.

The wizard would then present the information of all the chunks of those particular files to the user interacting with the wizard.

At the end of this step, the user would be able to see the information of all the chunks divided from their original uploaded files.

3– XML File Chunks Importing

In this step, the chunks of all files would be imported one by one using AJAX technique. The system would get the first chunk and present it to the XML file reader (developed by vteam #614).

The XML file reader would then process that chunk. It would read only one parent node along with its nested children nodes in the memory (ensuring less memory consumption). At the same time, it would import the information from the parent node which was loaded in the memory.

Additionally, the ePCR system would apply Transaction technique to import the code-block by ensuring the rollback of the data (which was entered) in case of database transaction failure. The import process would continue until all the parent nodes from the chunks of a single file are imported.

The system would then notify the user about the successful import of a single file chunks through notification against the information (of that file chunk) which was presented to the user in the second step of the wizard.

The system would now take the second chunk of that particular file and go through the import process for it (second chunk). The same process would apply on the remaining chunks of files (until all the files would import successfully).

The wizard would ensure that other processes would not be halted. Also, it would ensure the usage of less resources.

Conclusion

By applying these optimal techniques, vteam #614 saved the data of ePCR system from any possible data loss efficiently. As a result, an optimized and efficient bulk medical data importing wizard was achieved for a Multi-Tenant environment (SAAS based) as it consumed less memory and resources.