Loan Migration - Mifos 2.2 to MifosX

Loan Migration - Mifos 2.2 to MifosX

Introduction

This page describes how to migrate loans for an existing mifos installation onto MifosX.

Migration Steps

Prerequisites

  1. Loan Product setup on Mifosx (with matching name)

  2. Clients setup on MifosX (with external id)

Query mifos database for loans

The sql for extracting this from mifos database is as follows:

Note: you can use a unique identifier such as its mifos database id as an external id for loans. Below sql assumes that clients have being created with mifos database id as external id.

select a.customer_id as Client, a.account_id as Loan, po.prd_offering_name as Product, cast(ifnull(a.created_date, "") as char) as Created, cast(ifnull(app.changed_date, "") as char) Approved, cast(ifnull(disb.changed_date, "") as char) Disbursed, la.loan_amount as LoanPrincipal, la.interest_rate as InterestRate, no_of_installments as installments from account a join loan_account la on la.account_id = a.account_id left join account_status_change_history app on app.account_id = a.account_id and app.new_status = 3 left join account_status_change_history disb on disb.account_id = a.account_id and disb.new_status = 5 and disb.account_status_change_id = ( select min(disbmin.account_status_change_id) from account_status_change_history disbmin where disbmin.new_status = 5 and disbmin.account_id = a.account_id ) left join prd_offering po on po.prd_offering_id = la.prd_offering_id order by Client, Created

Extract resultset into csv file

Using sql query tool, extract resultset into a CSV file

Upload on MifosX

Use the menu option on MifosX Data Migration -> Upload Loans to upload csv template as described on page.

This will submit loans against 'created' date, approve them if 'approved' date provided and disburse them if 'disbursed' date provided.

At present the upload support flexibility around different principal, interest rate and number of installments over what is configured in the loan product.

Comments