How to begin this blog?
At first I should introduce myself.
I'm a young medical infomaticist from germany.
At the moment I'm customizing the LIS (Laboratory Information System) "Molis" for an laboratory.
I've got my Master Degree (M.Sc.) this year and begining my career.
What is the purpose of this blog?
While I was introduced to Molis, I beginn to realize,
that there isn't quite a lot of documentation about the LIS and especially MPL.
MPL or Molis Programming Language is the possibillity to customize this LIS to your needs.
But, except a ~70 page manual, you wont find anything...
Therefor the idea sparked in my mind, that I should set up a blog to unify programming solutions for everybody.
So you are welcome to participate by sending MPL codes. ;)
All posted code refers to and works in our Molis.
It isn't guranteed that it will work in yours.
Problem No.1 Version: Molis 4.31
Lets face it, OCR-software isn't the best at the moment.
So it likely to happen, that your scanning device sends incredibly wrong dates for the orignín of the sample.
How can we prevent that?
At first we need the date of the orderentry. This is stored in the field recept_dt.ORD.
The term ".ORD" refers to the current order and the term "recept_dt" to the date of reception of the order.
Okay which information do we need else?
Correct! The date of the generation of the sample. We can get this value from the field sample_dt.ORD.
Now we have anything we need for our first comparing logic.
But how do we get the values out of the field to compare them? Let me introduce you the command "ldate(,)".
With ldate() you get the value of an date field and can format it. But that will be an other post.
For the moment just accept, that ldate(recept_dt.ORD,"D2") returns the date of the orderentry.
A normal IF-clause in MPL looks like this:
if() endif
Not really spectaculary but it will fit our needs completly.
For the moment our code will be if(compare recept_dt.ORD and sample_dt.ORD) do something endif.
How do we proper compare variables in Molis. Well at first you need to know,
that every variable in Molis is treaten like a string. If you want a numerical comparison you've got to state this explicit.
This will be done with this little fellow: #
So this is our code at the moment:
if ((ldate(recept_dt.ORD,"D2")-ldate(sample_dt.ORD,"D2"))#>X)
do something
endif
What stands X for? X is the time difference of your choice between the sample date and the recept date.
For the purpose of this blog entry I choose 5 as a proper value. But it is up to you.
So right now we have this IF-clause, what should we do in it?
That will be all for today!
See you soon...
I am using MPL now as well, you are not alone anymore
AntwortenLöschenstarting to be trained at work for it, without IT background except personnal experience, so thanks for sharing, i will too!
AntwortenLöschen