At OpenMRS
Create the user(must be checked as provider) in the openmrs.
Login into openmrs
Go to Administration>Users(Manage Users)> Add user
(Here Superman is used for example)
Identify the uuid of the user/provider.
* login to mysql : openmrs database
> mysql -u root -pP@ssw0rd openmrs
(username: root , Password: P@ssw0rd)
# Identify the provider with the HRM identifier/provider identifier .
> select uuid from provider where identifier = '<provider_identifier>';
For Example
> select uuid from provider where identifier = 'superman';
uuid = c52d544a-7d55-11e5-acdf-90fba67c4298
*** This uuid will be added as external_id in the openElis provider table.
At OpenELIS
Find the last id created in the person table of clinlims.
* login to postgresql : clinlims database( schema: clinlims )
> psql -Uclinlims clinlims
(username: clinlims, Password: clinlims)
> select * from person order by id desc;
Create a person with the next id using sql query:
Add +1 with the last id
Add minimal information for the person
Query
> insert into person(id, last_name, first_name, middle_name)
values (last_id+1, 'Man', 'Super', '');
Find the last id created in the provider table of clinlims.
> select * from provider order by id desc;
Create a provider with the next id using sql query:
Add +1 with the last id
Add persion_id of the provider created above in the person table (id).
Add the uuid of openmrs provider as the external_id.
Query
> insert into provider(id, person_id, external_id) values (last_id+1, <id of person>, '<uuid of openMRS Provider>');
For Example
insert into person(id, last_name, first_name, middle_name)
values (17323, 'Man', 'Super', ' ');
insert into provider(id, person_id, external_id)
values (40, 17323, 'c52d544a-7d55-11e5-acdf-90fba67c4298');
*** If you have already the provider with person_id then you can update
UPDATE QUERY
update provider set external_id = 'c52d544a-7d55-11e5-acdf-90fba67c4298' where id = 40;
*** Hopefully, the provider name will be shown in the Requester name dropdown. You may restart the bahmni_lab service.
> systemctl restart bahmni-lab