Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When you place an test/panel order from EMR, the order would appear in the lab dashboard as “Samples to collect”. The next step is to add the sample and generate an accession, before results can be entered.

During this process, if you want to see the “orderer” information in the accession, you are required to provide the following setup, which maps a provider in EMR to another provider in LIS. As of now, there is no UI to do some of the steps below, and best to do through database.

At OpenMRS

...

  • Create the user (must be checked as provider) in the openmrsOpenMRS.

    • Login into openmrs

    • Go to Administration >Users→ Users(Manage Users) > Add user

(Here Superman is used for example)

  • Identify the uuid of the user/provider.

    • . Ensure that you chose the option “Create a Provider account for this user”

    • It is also advisable that you allocate an identifier for the provider you have created. You can do that once you have created a user, go to Administration → Manage Providers → Find by name, selecting the provider and updating the Identifier field.

  • Identify the unique id (UUID) of the the corresponding provider for the user in OpenMRS.

    • Go to Manage Providers and search by name. From the listed results, browse to the provider details page and copy the UUID

    • Alternatively, you may find the UUID from the database as well

      • 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

...

      • (you need to have the login credentials for the openmrs-user)

      • Identify the provider’s UUID with the Identifier you assigned above

Code Block
> mysql -u openmrs-user -p openmrs
> select uuid from provider where identifier = 'XYZ';
  • Note the UUID of the provider you identified above, this will be used as “external_id” reference in 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');

...

  • Create a user and corresponding provider in OpenELIS

    • Create a person and a corresponding provider

    • Map the external_id identified above to the provider

Code Block
# login to postgresql:clinlims database, schema clinlims
> psql -Uclinlims clinlims
# identify the latest person ID. In the below SQL, its the first entry
> select * from person order by id desc;

# Increment the ID (+1)and create a person. in the SQL below, last_id is the Id identified above
>  insert into person (id, last_name, first_name, middle_name) values (last_person_id+1, 'Nayar', 'Srijit', 'Kumar');
# Find the latest provider id created in the provider table of clinlims
> select * from provider order by id desc;
# With the person Id created above, and with the incremented the provider id identified above, create a new provider
> insert into provider(id, person_id, external_id) values (last_provider_id+1, <id of person>, '<uuid of OpenMRS Provider>');

  • If you already identified or know the provider with person_id then you can just update

...

UPDATE QUERY

...

  • the external_id reference

Code Block
> update provider set external_id =

...

 '<uuid of OpenMRS Provider>' where id = <identified provider id in Clinlims>;

With that, the provider name will be shown in the Requester name dropdown. You may restart the bahmni_lab service.

For Bahmni Native install

> systemctl restart bahmni-lab

For Bahmni Docker install, restart the bahmni_lab container