Re: Bika Connect to Humacount

54 views
Skip to first unread message

lemoene

unread,
Jun 15, 2018, 3:22:16 AM6/15/18
to free...@googlegroups.com, free...@googlegroups.com
Thank you for the feedback Anousak, and Eid Mubarak all.

I am dialling my reply through the Froid group so we can keep the ball rolling. I haven't had time to follow up here, been spending time on a few proposals, all of them featuring some very cool instruments. We might be doing a real life one as first for Froid, it could well be the Humacount!

Oh and re configuring Senaite, this chapter in the new manual is not quite complete yet, written for LIMS, but it 'll help too I hope, https://www.bikalims.org/manual/setup-and-configuration

Good place start...I can see that it is right step of doing LIS procedures. My staff are not familair how Senaite LIS works, we are doing the best we could. We'll get there.

Is a pity I only arrive end of September...-(  We are always keen to assist on the open forums where it benefits all (and we are under peer pressure to answer quickly;-), please use the Bika Health list for these questions. I am not sure I gave you access to our Health demo at https://health.bikalims.org/, will follow up under separate heading.
 
Potentially stupid question as I have not had enough time to read the docs: Is the TXT file an example of  the Humacount results Anousak? It opens sweetly as TSV.

Yes, it is Humacount result in plain text.
 
If so, then its parser should be relatively easy, see https://github.com/bikalims/bika.lims/wiki/creating-an-instrument-import-interface (Which has been described as long winded and written for beginners - it is a frequent entry point for new Bika | Senaite coders).  Skilled coders who have done these before, complete and test the easier ones in a day. You'll take a bit longer initially I guess.

The current parsers live at https://github.com/senaite/senaite.core/tree/master/bika/lims/exportimport/instruments and another recommendation I frequently see is that you should simply pick a similar one to yours, then clone and hack it.

Finding a similar one could be difficult, in the tracker you'll find results files attached to instrument interface requests, the ones in the blue 'Instrument Specs' epic has not been don yet. A simple 2D results table, similar to your TXT file, I remember was done in our very first one for the Foss Winescan FT120, its code could be old, https://github.com/senaite/senaite.core/tree/master/bika/lims/exportimport/instruments/foss/winescan.

With Froid then, we'd be looking at the parser outputting REST as per the doc I circulated earlier. I have a longer more detailed version I'll touch up and send on.


Lemoene, these are good info and useful indeed.  I have submitted a request  trough tracker for Humacount interface to LIS on https://jira.bikalabs.com/browse/LIMS-2858.

Thanks for putting it on record, but remember that all free assistance there is voluntary, we have to focus on contracted clients at the moment to sustain the project - the migration of the past 6 months did not deliver much invoicing opportunity. That said, please continue posting your interface questions here where we have I think 27 subscribers already. You're an old hand at FOSS and I am sure knows that well researched questions do a lot better than others;-)

In our own team, Lunga has much experience with these, is subscribed here and I am asking him to keep a lookout for you too. I am still on-site amidst a v tricky implementation and hope to find time over the weekend to assist on the other points you raised.

Have a good one!
l

Anousak Souphavanh

unread,
Jul 2, 2018, 12:35:25 AM7/2/18
to Froid. Free Open Instrument Middleware
Thanks, Lemoene et all for your kind attention to this. I really want to test it so that our partner is happy with Senaite Health for their use in the hospital. We will need get at least one instrument and test it, of course will cooperate with you on: GNUHealth-SENAITE and other instruments such as RS32 and other instruments.

I would like to ask for your support so that I can start digging in to, perhaps, hack an existing code from an instrument such as FOSS-WINESCAN. But there are some clarifications that I would need to understand it first.

1. HumaCount Model 80TS provides a plain text. As far as I understand it, Humacount instrument can setup to link to SENAITE Health as automation (setup an IP based then it automatically sending results after it is done). I attached sample for your perusal.
2. Under FOSS/WINESCAN samples is saved as CSV. Please advice how to convert TXT to CVS or just leave it as plain text and to modify existing code to read as PLAIN text.

Any suggestions would be greatly help me to get things moving for now and thanks in advance.

Anousak
save_925041_1129_01.txt

lemoene

unread,
Jul 2, 2018, 3:30:32 PM7/2/18
to Froid. Free Open Instrument Middleware
Hi Anousak

.... hack an existing code from an instrument such as FOSS-WINESCAN. Clarifications that I would need to understand


1. HumaCount Model 80TS provides a plain text. As far as I understand it, Humacount instrument can setup to link to SENAITE Health as automation (setup an IP based then it automatically sending results after it is done). I attached sample for your perusal.

Jip, that is actually a TSV, Tab Separated Values and you would parse it like the CSV in the WineScan


2. Under FOSS/WINESCAN samples is saved as CSV. Please advice how to convert TXT to CVS or just leave it as plain text and to modify existing code to read as PLAIN text.

There are TSV parsers already too, @Lunga can you think of one already? You basically separate the values on /tab values instead of commas I would think (no coder anymore:(


Any suggestions would be greatly help me to get things moving for now and thanks in advance.

The Humacount parser you write could also use the standard Senaite code to pick the TSV up automatically and post it to OpenHIM.

I condensed this earlier from OpenHIM RESTful API documentation:
PUT Is used to write to an OpenHIM Channel configured for the Instrument

PUT /channels/:channelId
where :channelId is the _id property of the channel to update with a json body representing the channel updates

Channel schema

When I am up for the air, we'd be installing 'HIM online and do its Channel config with Jembi's assistance. Please keep us updated with your progress re the above.

Bests
Lemoene





Anousak

On Friday, June 15, 2018 at 2:22:16 PM UTC+7, Lemoene Smit wrote:
Thank you for the feedback Anousak, and Eid Mubarak all.

I am dialling my reply through the Froid group so we can keep the ball rolling. I haven't had time to follow up here, been spending time on a few proposals, all of them featuring some very cool instruments. We might be doing a real life one as first for Froid, it could well be the Humacount!

Oh and re configuring Senaite, this chapter in the new manual is not quite complete yet, written for LIMS, but it 'll help too I hope, https://www.bikalims.org/manual/setup-and-configuration

Good place start...I can see that it is right step of doing LIS procedures. My staff are not familair how Senaite LIS works, we are doing the best we could. We'll get there.

Is a pity I only arrive end of September...-(  We are always keen to assist on the open forums where it benefits all (and we are under peer pressure to answer quickly;-), please use the Bika Health list for these questions. I am not sure I gave you access to our Health demo at https://health.bikalims.org/, will follow up under separate heading.
 
Potentially stupid question as I have not had enough time to read the docs: Is the TXT file an example of  the Humacount results Anousak? It opens sweetly as TSV.

Yes, it is Humacount result in plain text.
 
If so, then its parser should be relatively easy, see https://github.com/bikalims/bika.lims/wiki/creating-an-instrument-import-interface (Which has been described as long winded and written for beginners - it is a frequent entry point for new Bika | Senaite coders).  Skilled coders who have done these before, complete and test the easier ones in a day. You'll take a bit longer initially I guess.

The current parsers live at https://github.com/senaite/senaite.core/tree/master/bika/lims/exportimport/instruments and another recommendation I frequently see is that you should simply pick a similar one to yours, then clone and hack it.

Finding a similar one could be difficult, in the tracker you'll find results files attached to instrument interface requests, the ones in the blue 'Instrument Specs' epic has not been don yet. A simple 2D results table, similar to your TXT file, I remember was done in our very first one for the Foss Winescan FT120, its code could be old, https://github.com/senaite/senaite.core/tree/master/bika/lims/exportimport/instruments/foss/winescan.

With Froid then, we'd be looking at the parser outputting REST as per the doc I circulated earlier. I have a longer more detailed version I'll touch up and send on.


Lemoene, these are good info and useful indeed.  I have submitted a request  trough tracker for Humacount interface to LIS on https://jira.bikalabs.com/browse/LIMS-2858.

Thanks for putting it on record, but remember that all free assistance there is voluntary, we have to focus on contracted clients at the moment to sustain the project - the migration of the past 6 months did not deliver much invoicing opportunity. That said, please continue posting your interface questions here where we have I think 27 subscribers already. You're an old hand at FOSS and I am sure knows that well researched questions do a lot better than others;-)

In our own team, Lunga has much experience with these, is subscribed here and I am asking him to keep a lookout for you too. I am still on-site amidst a v tricky implementation and hope to find time over the weekend to assist on the other points you raised.

Have a good one!
l

--
You received this message because you are subscribed to the Google Groups "Froid. Free Open Instrument Middleware" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freefroid+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/freefroid/376d3c9f-e110-4f15-aca9-2ded4db0ec8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


lemoene

unread,
Jul 3, 2018, 8:28:38 AM7/3/18
to Froid. Free Open Instrument Middleware
Hi Anousak
.... hack an existing code from an instrument such as FOSS-WINESCAN. Clarifications that I would need to understand
1. HumaCount Model 80TS provides a plain text. As far as I understand it, Humacount instrument can setup to link to SENAITE Health as automation (setup an IP based then it automatically sending results after it is done). I attached sample for your perusal.
Jip, that is actually a TSV, Tab Separated Values and you would parse it like the CSV in the WineScan

These are the keywords you have to configure in their Analysis Services and then parse the results files for them (from the HumaCount brochure)
BAS    BAS%    EOS    EOS%    HCT    LYM    LYM%    MCH    MCHC    MCV    MON    MON%    MPV    NEU    NEU%    PCT    PDWcv    PDWsd    PLT    RBC    RDWcv    RDWsd HGB    WBC

2. Under FOSS/WINESCAN samples is saved as CSV. Please advice how to convert TXT to CVS or just leave it as plain text and to modify existing code to read as PLAIN text.
There are TSV parsers already too, @Lunga can you think of one already? You basically separate the values on /tab values instead of commas I would think (no coder anymore:(


Indeed, the Shimadzu ICP-AES ICPE-9000 if you can find it in the code, does a TSV import

Bests, and keep us posted
l



Any suggestions would be greatly help me to get things moving for now and thanks in advance.

The Humacount parser you write could also use the standard Senaite code to pick the TSV up automatically and post it to OpenHIM.

I condensed this earlier from OpenHIM RESTful API documentation:
PUT Is used to write to an OpenHIM Channel configured for the Instrument

PUT /channels/:channelId
where :channelId is the _id property of the channel to update with a json body representing the channel updates

Channel schema

When I am up for the air, we'd be installing 'HIM online and do its Channel config with Jembi's assistance. Please keep us updated with your progress re the above.

Anousak Souphavanh

unread,
Jul 10, 2018, 7:10:52 AM7/10/18
to Froid. Free Open Instrument Middleware
Many thanks Lemoene for your reply.

Please see my reply below.


On Tuesday, July 3, 2018 at 7:28:38 PM UTC+7, Lemoene Smit wrote:
Hi Anousak
.... hack an existing code from an instrument such as FOSS-WINESCAN. Clarifications that I would need to understand
1. HumaCount Model 80TS provides a plain text. As far as I understand it, Humacount instrument can setup to link to SENAITE Health as automation (setup an IP based then it automatically sending results after it is done). I attached sample for your perusal.
Jip, that is actually a TSV, Tab Separated Values and you would parse it like the CSV in the WineScan

These are the keywords you have to configure in their Analysis Services and then parse the results files for them (from the HumaCount brochure)
BAS    BAS%    EOS    EOS%    HCT    LYM    LYM%    MCH    MCHC    MCV    MON    MON%    MPV    NEU    NEU%    PCT    PDWcv    PDWsd    PLT    RBC    RDWcv    RDWsd HGB    WBC



Just wondering if LIMS works on this. Current situation is like this, 
1. Either 18 or 24 parameters from Humacount instruments cost is bundled into a single cost, e.g 18paramet is 5$.
2. My wondering if in Senaite LIMS, we would need a single break-down cost for each. Is there a way we can specify a bundle cost for analysis service?

 
2. Under FOSS/WINESCAN samples is saved as CSV. Please advice how to convert TXT to CVS or just leave it as plain text and to modify existing code to read as PLAIN text.
There are TSV parsers already too, @Lunga can you think of one already? You basically separate the values on /tab values instead of commas I would think (no coder anymore:(


Indeed, the Shimadzu ICP-AES ICPE-9000 if you can find it in the code, does a TSV import

Bests, and keep us posted
l



Yes, indeed you right. Either Shimadzu or thermoscientific/gallery will do since they both do TSV or plain text scan. My question is after hacking some existing codes to fit the humacount instrument (created  a folder called ...bika/lims/exportimport/instruments/humacount80ts with the 3 files, two *.py and one .pt and a folder called samples folder), we would need to update with this command bin/buildout -c senaite.cfg or it is short-cut to get an update or to test. I really couldn't find on the specific testing procedure.

Thanks,
Anousak

lemoene

unread,
Jul 10, 2018, 8:31:57 AM7/10/18
to Bika Health, Froid. Free Open Instrument Middleware
Hi Anousak   
1. HumaCount Model 80TS provides a plain text. As far as I understand it, Humacount instrument can setup to link to SENAITE Health as automation (setup an IP based then it automatically sending results after it is done). I attached sample for your perusal.
Jip, that is actually a TSV, Tab Separated Values and you would parse it like the CSV in the WineScan

These are the keywords you have to configure in their Analysis Services and then parse the results files for them (from the HumaCount brochure)
BAS    BAS%    EOS    EOS%    HCT    LYM    LYM%    MCH    MCHC    MCV    MON    MON%    MPV    NEU    NEU%    PCT    PDWcv    PDWsd    PLT    RBC    RDWcv    RDWsd HGB    WBC
Just wondering if LIMS works on this. Current situation is like this, 
1. Either 18 or 24 parameters from Humacount instruments cost is bundled into a single cost, e.g 18paramet is 5$.
2. My wondering if in Senaite LIMS, we would need a single break-down cost for each. Is there a way we can specify a bundle cost for analysis service?

Indeed, these Tests commonly ordered together, often called Panels or Masks too, are implemented as Analysis Profiles in Bika/Senaite, and can be priced like that.

See a Full Blood Count Profile in the demo, https://health.bikalims.org/bika_setup/bika_analysisprofiles/analysisprofile-16




And on the Accounting tab:



2. Under FOSS/WINESCAN samples is saved as CSV. Please advice how to convert TXT to CVS or just leave it as plain text and to modify existing code to read as PLAIN text.
There are TSV parsers already too, @Lunga can you think of one already? You basically separate the values on /tab values instead of commas I would think (no coder anymore:(
Indeed, the Shimadzu ICP-AES ICPE-9000 if you can find it in the code, does a TSV import

Yes, indeed you right. Either Shimadzu or thermoscientific/gallery will do since they both do TSV or plain text scan.

.... after hacking some existing codes to fit the humacount instrument (created a folder called ...bika/lims/exportimport/instruments/humacount80ts with the 3 files, two *.py and one .pt and a folder called samples folder),

I am no coder but that sounds right


we would need to update with this command bin/buildout -c senaite.cfg or it is short-cut to get an update or to test.

Not that I know of, Khurram?


I really couldn't find on the specific testing procedure.

Apologies, I don't think that is written up. Stand by
l


--
You received this message because you are subscribed to the Google Groups "Froid. Free Open Instrument Middleware" group.
To unsubscribe from this group and stop receiving emails from it, send an email to freefroid+...@googlegroups.com.

lemoene

unread,
Jul 10, 2018, 8:36:52 AM7/10/18
to Bika Health, Froid. Free Open Instrument Middleware
Re Senaite build-out Anousak - we should not have to touch the LIMS code I realise. Your parser should be free standing, Python in this case, and post RESTfully to the LIMS or OpenHIM

We should have a HIM up soon

Bests
l

lemoene

unread,
Jul 10, 2018, 8:38:25 AM7/10/18
to Bika Health, Froid. Free Open Instrument Middleware
On 10/07/2018 14:36, lemoene wrote:
Re Senaite build-out Anousak - we should not have to touch the LIMS code I realise. Your parser should be free standing, Python in this case, and post RESTfully to the LIMS or OpenHIM

We should have a HIM up soon


Anousak Souphavanh

unread,
Jul 11, 2018, 6:23:19 AM7/11/18
to Froid. Free Open Instrument Middleware
Hi Lemoene,


On Tuesday, July 10, 2018 at 7:36:52 PM UTC+7, Lemoene Smit wrote:
Re Senaite build-out Anousak - we should not have to touch the LIMS code I realise. Your parser should be free standing, Python in this case, and post RESTfully to the LIMS or OpenHIM

We should have a HIM up soon



Anywhere I can check on the progress of HIM and Senaite Health/LIMS?


 
Bests
l



1. HumaCount Model 80TS provides a plain text. As far as I understand it, Humacount instrument can setup to link to SENAITE Health as automation (setup an IP based then it automatically sending results after it is done). I attached sample for your perusal.
Jip, that is actually a TSV, Tab Separated Values and you would parse it like the CSV in the WineScan

These are the keywords you have to configure in their Analysis Services and then parse the results files for them (from the HumaCount brochure)
BAS    BAS%    EOS    EOS%    HCT    LYM    LYM%    MCH    MCHC    MCV    MON    MON%    MPV    NEU    NEU%    PCT    PDWcv    PDWsd    PLT    RBC    RDWcv    RDWsd HGB    WBC
Just wondering if LIMS works on this. Current situation is like this, 
1. Either 18 or 24 parameters from Humacount instruments cost is bundled into a single cost, e.g 18paramet is 5$.
2. My wondering if in Senaite LIMS, we would need a single break-down cost for each. Is there a way we can specify a bundle cost for analysis service?

Indeed, these Tests commonly ordered together, often called Panels or Masks too, are implemented as Analysis Profiles in Bika/Senaite, and can be priced like that.

See a Full Blood Count Profile in the demo, https://health.bikalims.org/bika_setup/bika_analysisprofiles/analysisprofile-16




And on the Accounting tab:



This helps alot and many thanks for your pointer.

 
2. Under FOSS/WINESCAN samples is saved as CSV. Please advice how to convert TXT to CVS or just leave it as plain text and to modify existing code to read as PLAIN text.
There are TSV parsers already too, @Lunga can you think of one already? You basically separate the values on /tab values instead of commas I would think (no coder anymore:(
Indeed, the Shimadzu ICP-AES ICPE-9000 if you can find it in the code, does a TSV import

Yes, indeed you right. Either Shimadzu or thermoscientific/gallery will do since they both do TSV or plain text scan.

.... after hacking some existing codes to fit the humacount instrument (created a folder called ...bika/lims/exportimport/instruments/humacount80ts with the 3 files, two *.py and one .pt and a folder called samples folder),

I am no coder but that sounds right

we would need to update with this command bin/buildout -c senaite.cfg or it is short-cut to get an update or to test.

Not that I know of, Khurram?

I really couldn't find on the specific testing procedure.

Apologies, I don't think that is written up. Stand by
l


I wanted to test if the code is properly set and modified accordingly. 

 
To unsubscribe from this group and stop receiving emails from it, send an email to freefroid+unsubscribe@googlegroups.com.

lemoene

unread,
Jul 11, 2018, 6:57:19 AM7/11/18
to Froid. Free Open Instrument Middleware
Hi Anousak

Re Senaite build-out Anousak - we should not have to touch the LIMS code I realise. Your parser should be free standing, Python in this case, and post RESTfully to the LIMS or OpenHIM

We should have a HIM up soon

Anywhere I can check on the progress of HIM and Senaite Health/LIMS?

It should be up some time early next week, likely at openhim.Froid.io. I might be out of town and not sure when we'll get to configure it, maybe we can do it remotely with one of the Jembi techs' assistance Carl?

For now, please shape your Humacount parser like this:

  1. Instrument Handler OpenHIM Interface

The instrument handlers can be be coded in any technology, JS frameworks are popular.

For CSV instrument 1, the Handler must

  • Pick up the results file from a designated folder

  • Parse the meaningful and specified data from the file

  • PUT the required attribute names and values to OpenHIM

  • PUT the raw CSV file to OpenHIM

Bika wiki Interface Documentation for the latter


Then, check out the Channel schema for OpenHIM, from the draft spec:
    1. REST

OpenHIM RESTful API documentation

PUT Is used to write to an OpenHIM Channel configured for the Instrument

PUT /channels/:channelId

where :channelId is the _id property of the channel to update with a json body representing the channel updates. Channel schema.
And this part I need to get my teeth into:

  1. OpenHIM Configuration

OpenHIM a rules engine needs to be configured to transform the instrument attribute names received from its handler, to valid FHIR names

Relevant FHIR messages are likely to be found in its Diagnostic Report module - detailed documentation and examples. The Specimen module does not handle results it seems.  

Groups of results can now be reported together in DiagnosticReport.result

Definition. Observations that are part of the diagnostic report,  simple name/value pairs, e.g. atomic results, or groups that include references to other members of the group, e.g. panels, Bika Profiles

Requirements. Need to support individual results, or report groups of results, where the result grouping is arbitrary, but meaningful. This structure is recursive - observations can contain observations.

Alternate Names. Data, Atomic Value, Result, Atomic result, Data, Test, Analyte, Battery, Organizer

Examples of multiple tests on singular Samples:

Lipids Profile, XML, JSON

Complete Blood Count,  XML or JSON

For Instrument exports containing the results of more than one Sample, A Worksheet concept can be used, similar to that already employed in Bika, where all the analyses destined for an Instrument normally gets grouped together in any case

Neither Worksheet or Patient IDs however are required to match results uniquely to their Analyses in the LIMS - Sample ID and Analysis Keyword are enough

Bika Names added to the full Diagnostic Report content list here.


The most useful for Analysis Results are:


FHIR Diagnostic Report

A combination of request information Atomic results, images, interpretation, and formatted report elements

Diagnostic

Report

Bika AR - Analysis Request

Bika WS - Worksheet

Name

Bika Name

Example

Bika Name

Example

identifier

AR ID

Cx18-46664-R1

WS ID

WS18-022082

basedOn

AR

AR

WS

WS

status Required

AR State

preliminary

WS State

prliminWSy

effective

DateTime

DateTime

Analysed

2018/05/01 11:11



result

AR Results

Table of

Analysis Keyword, Result, Unit

WS Results

Table of

AR ID, Analysis Keyword, Result, Unit

image

Attachment

CSV File name

Attachment

CSV File name

presented

Form

Results File

Instrument CSV

Results File

Instrument CSV

Optional

subject

Patient ID

P18-00022082



performer

Analyst name

Afolabi Schneider



role

Role

Analyst



specimen

Sample ID

Cx18-46664



conclusion

Interpretation

Inconclusive



Please report issues with the documentation, we can verify and polish it up as we go along - could contain embarrasing errors at this stage;-)

Bests
L


To unsubscribe from this group and stop receiving emails from it, send an email to freefroid+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/freefroid/7623c618-ac4d-4543-94ed-714a684ccf28%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages