ctmrbio / claritylims

Customizations for our GenoLogics BaseSpace Clarity LIMS
MIT License
2 stars 2 forks source link

covid-19: remove anamnes from free text field in SmiNet reports #164

Closed boulund closed 4 years ago

boulund commented 4 years ago

As we are going to start testing more and more people that are not health care staff I think we should remove the Anamnes: personalprov comment in the free text field in the submitted SmiNet reports.

https://github.com/ctmrbio/claritylims/blob/prod/clarity-ext-scripts/clarity_ext_scripts/covid/report_to_sminet.py#L88

We should just replace it with an empty string until further notice.

I have heard reports that this field will soon be used to report other tracking details about the tested individual (e.g. workplace, etc.). Then we'll have to make sure the code can grab the info it needs from the direkttest.se API and put it into the free text field.

boulund commented 4 years ago

Change of plans. It turned out today that VGR needs us to report some specific information from the notes field of the ServiceRequest object in this text field to SmiNet starting this week, so this just turned into a super high prio thing!

@chichackles , did you do any work on this already? If not, I'm going to start with this this afternoon

boulund commented 4 years ago

Notes to self:

The call starts at https://github.com/ctmrbio/claritylims/blob/prod/clarity-ext-scripts/clarity_ext_scripts/covid/report_to_sminet.py#L88

Then to https://github.com/ctmrbio/claritylims/blob/prod/clarity-ext-scripts/clarity_ext_scripts/covid/services/knm_sminet_service.py#L124

Then using this lazyprop: https://github.com/ctmrbio/claritylims/blob/prod/clarity-ext-scripts/clarity_ext_scripts/covid/services/knm_service.py#L72

Then, write a for loop that runs through all text notes in the ServiceRequest object and add the order_note=TEXT text to the free text field. https://github.com/ctmrbio/claritylims/blob/prod/clarity-ext-scripts/clarity_ext_scripts/covid/services/knm_sminet_service.py#L123

{
 "resourceType": "ServiceRequest",
 "id": "1",
 "identifier": [
 {
 "system": "http://uri.d-t.se/id/Identifier/i-lab/region-stockholmkarolinska",
 "value": "ABC123"
 },
 {
 "assigner": {
 "display": "Direkttest unique referral code"
 },
 "system": "http://uri.d-t.se/id/Identifier/i-referral-code",
 "value": "1234567897"
 }
 ],
 "status": "active",
 "intent": "original-order",
 "subject": {
 "reference": "Patient/4000"
 },
 "authoredOn": "2020-04-19T10:34:10+02:00",
 "requester": {
 "reference": "Practitioner/1",
 "display": "Anna Andersson"
 },
 "code": {
 "coding": [
 {
 "system": "http://uri.d-t.se/id/CodeSystem/cs-test-types",
 "code": "SARS-CoV-2-RNA"
 }
 ],
 "text": "SARS-CoV-2-RNA"
 },
 "note":[
 {
 "text":"order_caregiver_name=Västra Götalandsregionen"
 },
 {
 "text":"order_caregiver_id=1"
 },
 {
 "text":"order_region_name=Göteborg"
 },
 {
 "text":"order_region_id=1"
 },
 {
 "text":"order_electronic_identification=1"
 },
 {
 "text":"order_type=web"
 },
 {
 "text":"order_lab_name=NPC"
 },
 {
 "text":"order_lab_id=2"
 },
 {
 "text":"order_note=AA111"
 },
 {
 "text":"kit_batch_id=1"
 },
 {
 "text":"kit_batch_type=pickup-rna-complete"
 },
 {
 "text":"kit_batch_ordered_by=Skogens vårdcentral"
 },
 {
 "text":"kit_batch_orderer_code=ABC123"
 },
 {
 "text":"kit_batch_address=Vägen 1"
 },
 {
 "text":"kit_batch_zipcode=405 00"
 },
 {
 "text":"kit_batch_city=Göteborg"
 },
 {
 "text":"kit_batch_additional_information=Lite annat"
 },
 {
 "text":"kit_batch_created_at=2020-06-07T13:42:36+02:00"
 },
 {
 "text":"kit_batch_updated_at=2020-06-07T13:42:36+02:00"
 }
 ]
}
boulund commented 4 years ago

This is done and merged to dev for testing today

boulund commented 4 years ago

Testing took longer than expected due to issues with the control panel on direkttest, @MaeSei and I are testing right now. If everything works we'll deploy right away. Since it's only a small script update, it will have minimal impact, and will worst case only affect SmiNet reports over the weekend. If the step breaks, we can rollback to an earlier state by merging a different commit.

boulund commented 4 years ago

Merged to prod