Concept missing openmrs-module commonlabtest

I have cloned and installed the module with reference application 2.0.I try my best to get the whole idea of module.Can some have experience with this module.The module is currently working fine but while adding sample it require “SampleSite” the concept are missing,So I created the concept and provide the uuid but it’s not picking.How to add sampleSite concept to this module. @tahira @ahmed14 @owais.hussain Thanks

Hi @naveed1228 ,

We (@owais.hussain, @shujaat, @ahmed14) have developed this module and it basically handles information related to Lab Tests from ordering phase to results for patients.

Here is the basic workflow:

  1. A Lab Test order is requested for a particular test type.
  2. This step involves collecting sample information if the ordered test requires any sample to process.
  3. Lab results are entered.

The module actually requires some setting up of the global properties before it can be used. Like all the metadata related information like Specimen Type, Specimen Site etc are handled through global properties. In your particular issue, please set the uuid of the concept to the global property named “commonlabtest.specimenSiteConceptUuid”. Please note, it should be a coded concept. There will be some more global properties that you need to set up (all will have this keyword commonlabtest).

Hope it solves your problem. Please let me know if there are some other issues, I would be happy to help.

Thanks Tahira Can you please create the specimen site concept at openmrs demo,So by following that I will create the concept in my local environment.I think after that I will just provide the conceptuuid at global property.I create the concepts here but somehow it’s not appearing in dropdown of specimen site.

specimen source is available in concept dictionary.The missing concepts are specimenSite and testunitsConceptUuid.I have created the specimentSite by following the specimentSource by somehow it’s not showing in specimentSite dropdown.

I have created a concept on openmrs demo " SPECIMEN SITE". It should be a coded concept. Same goes for the specimen type and test units concepts (this test unit refers to the units in which the sample is quantified.)

thanks and and please explain the term reference lab number as well.

You’re welcome. Lab Reference number is basically Test Order ID which is assigned by lab, if a user does not specify then it is auto-generated time stamp (but still it can be edited later).

1 Like

One thing more related to Restful api.In the swagger documentation the POST and Update methods are missing.Will you please it’s missing in swagger.If it is will you please provide some mock object so I can test it from Postman.

I am a little worried about the direction this is going. I think CIEL might need to re-evaluate the appropriate specimen concepts. These need to interoperate with the HL7 requirements for message creation. I believe there is a specimen site which represents an anatomical location and a specimen type which involves things like punch biopsy, swab, etc. There are then attributes to each of them which require mapping to SNOMED, etc. I will go look up my documentation.

1 Like

The way IMO looks at this is: "Specimen Type”, SNOMED maps for these concepts must be to a SNOMED in the “specimen” hierarchy (SNOMED 123038009 and its descendants) and is meant to populate HL7 2.5.1 SPM-4. The HL7 2.5.1 SPM-8 element is supposed to reflect the anatomic source of a specimen, and must be coded to the SNOMED “body structure” hierarchy (123037004 and its descendants). I would recommend we use SPECIMEN SOURCE as the anatomic site of specimen and SPECIMEN TYPE as the form of the specimen. So, Bronchioalveolar lavage fluid would be a SPECIMEN TYPE and Left lower lobe of lung would be a SPECIMEN SOURCE.

1 Like

@tahira I’m trying to post lab testorder using the following object.I’m not able to post using post man with following things. @owais.hussain

url:"http://localhost:8080/openmrs/ws/rest/v1/commonlab/labtestorder "

JSON POST REQUEST

{ “labTestType”:“ee9b140e-9a29-11e8-a296-40b034c3cfee”, “labReferenceNumber”: “1”, “encounter”:“fe14a3a2-13ad-4bf4-a8f0-f073ba885e59”, “careSetting”:“c365e560-c3ec-11e3-9c1a-0800200c9a66” }

will you please provide some information related to this.

@naveed1228 please try submitting this json POST request

{ “labReferenceNumber”:“123”, “labInstructions”: “some instructions”, “resultComments”:“none”, “labTestType”:“a0b5e0de-b2cb-44f1-beb2-50e4497786d6”, “order”: { “patient”:“31ae1bb1-fdc0-490a-9744-7f5fda9130ca”, “concept”:“92e52933-2246-4368-839e-46fed42a9572”, “instructions”:“intructions if any”, “encounter”:“87ea26a8-4648-49c3-bdaf-66fe6c69c5de”, “careSetting”:“c365e560-c3ec-11e3-9c1a-0800200c9a66”, “sortWeight”:1, “type” : “testorder”, “orderer”:“e4ef4d4d-5cf2-47ff-af6b-bb9abdabdd60”, “action”:“NEW” }

}

Please replace the uuids with the valid ones.

1 Like

I’m getting this error in response of post labOrder. https://pastebin.com/X9HaQz7g

@naveed1228 Assuming that you have given valid uuids (orderer references to Provider Uuid), please make sure that you have selected “Basic Auth” in Authorization tab in postman.

Yes @tahira I set the authentication in postman.I also tried it with openmrs test interface.

Are you sure the code available on github is up to date, because in code I’m not able to see the resources for the POST Method of labtestorder.

@naveed1228 which branch are you looking at ? Please switch to beta branch.

1 Like

Getting the same error in response of post common lab order.This time I cloned the beta branch and test with that as well.Will please it’s working with you in beta branch?

1 Like

Sorry @naveed1228 for not getting back to you timely. We’ve merged the beta into master branch.

If it helps, you can use our demo server for testing: http://ihs.ihsinformatics.com:9902/openmrs/module/webservices/rest/test.htm demo/Demo1234

We’ve written test cases for the API, so please check out the code and make sure that your tests are all passing. Also have a look at the test data set. May be there’s something we missed in the liquibase file which was needed in module and was entered directly into our DB when writing code.

Hi @akanter, you are right. We have plans to make the SPECIMEN SITE and other prerequisite concepts configurable via global properties. @tahira please confirm if this has already been done.

Now coming to your follow-up comment, some part was too much for us techies, but what I understood was that SPECIMEN SOURCE is the right concept to use, which in CEIL is 159959. This is exactly the one we are using too (SPECIMEN SITE is a synonym we added).