Hello back again!
Today there will be a brief introduction on how to get your needed information out of Molis.
By pressing "Esc", then "F1" and then "n" you can display the name of the current mask.
As an alternative you can read out the system parameter No. 1000. In this parameter the name of the current mask is saved.
If you want to combine your logic with the current mask you need to code:
$mask=ssysparam(xxx)
The xxx stands for your numerical register. In our case it will be the name of the current mask.
Watch out for the double "s" at the beginning!
So if you want to display it with the "mess" function you could write:
mess("Name of the mask: %%ssysparam(1000)%%%")
This function will only display the text in the message frame, which you can pop up at the bottom of your screen. This won't interrupt the user with any pop ups.
That's all for now, but the next entry comes soon!
Until then: Happy coding!!!!
Freitag, 7. Februar 2014
Sonntag, 2. Februar 2014
Those dates!!!!
Hi and welcome back to the MPL blog of your choice...
...well it's the only blog about the molis programming language. :D
As I described in the last post I will show you this time the huge difference between sample_dt.-1 and DT.-1.
So lets just begin with sample_dt.ORD. In this field the date of the currenct order is saved. If you want the date of not the current order but the order before you only have to write sample_dt.-1. If you want the date of the oder before that you write sample_dt.-2 and so on.
In comparison to sample_dt.ord we have DT{XX} and DT.-1{XX}. DT give us the date of the analytical procedure specified with XX.
So what is all the fuzz about it?
Well there is a big difference between these two functions. While sample_dt.-1 returns the date of the oder befor of the actual order DT.-1{XX} returns the date of the procedure befor the actual procedure.
An example: In your actual oder you want to measure hemoglobin, but only if you didn't measured it in the last week for the same patient. So you could check on sample_dt.-1 but that would only return the date of the last order not the date of your last hemoglobin procedure. So you see, there is room for many logical mistakes if you use sample_dt.-1 instead of DT.-1{XX}.
We will see a implementation of this post in the future.
Until then: Happy MPL coding!
...well it's the only blog about the molis programming language. :D
As I described in the last post I will show you this time the huge difference between sample_dt.-1 and DT.-1.
So lets just begin with sample_dt.ORD. In this field the date of the currenct order is saved. If you want the date of not the current order but the order before you only have to write sample_dt.-1. If you want the date of the oder before that you write sample_dt.-2 and so on.
In comparison to sample_dt.ord we have DT{XX} and DT.-1{XX}. DT give us the date of the analytical procedure specified with XX.
So what is all the fuzz about it?
Well there is a big difference between these two functions. While sample_dt.-1 returns the date of the oder befor of the actual order DT.-1{XX} returns the date of the procedure befor the actual procedure.
An example: In your actual oder you want to measure hemoglobin, but only if you didn't measured it in the last week for the same patient. So you could check on sample_dt.-1 but that would only return the date of the last order not the date of your last hemoglobin procedure. So you see, there is room for many logical mistakes if you use sample_dt.-1 instead of DT.-1{XX}.
We will see a implementation of this post in the future.
Until then: Happy MPL coding!
Anouncement
Hello back again!
Today I wont deliver a long informative post. But I wil outline the shape of a little series of post regarding one topic.
The topic is: how to get the most out of the REM field of an analytical procedure.
The REM field is a kind of commentary field open for any input you like.
At first I will introduce to you the concepts of nindex() and substrings, then I show you hor to build a multi level parser with your freshly gained knowlegde.
At the end of the mini series of posts I will show all of this in work as we redesigne or own "delta check" function.
"Why?" you migth ask, well because the build in function is all fucked up because of sample_dt.-1 vs DT.-1 and other reasons like totally awefulness ;)
So stay tuned! And happy coding!
Today I wont deliver a long informative post. But I wil outline the shape of a little series of post regarding one topic.
The topic is: how to get the most out of the REM field of an analytical procedure.
The REM field is a kind of commentary field open for any input you like.
At first I will introduce to you the concepts of nindex() and substrings, then I show you hor to build a multi level parser with your freshly gained knowlegde.
At the end of the mini series of posts I will show all of this in work as we redesigne or own "delta check" function.
"Why?" you migth ask, well because the build in function is all fucked up because of sample_dt.-1 vs DT.-1 and other reasons like totally awefulness ;)
So stay tuned! And happy coding!
Labels:
DELTA CHECK,
DT{},
MOLIS,
MPL,
nindex,
PROGRAMMING,
SAMPLE_DT,
substr
Dienstag, 28. Januar 2014
A neat end for our first MPL
Hello back again!
The second post is right incoming ;)
The last post ended with a question to you. What should we do in the If-Clause?
Well principially it is up to you. But we wanted to check if our OCR-device send us the right date, therefor we should ask the user what is the right thing at the moment.
So how to ask something? In MOLIS we have several possibilities to display messages onto the screen. The first is the function askparam() in which we could ask the value of anything we want. Like a date or the value of an analysis or the weigth of the patient... The other ist askmess(), which we will use in this problem.
The function askparam() uses two inputs. The first ist the question and the second are the possible answers. In return, the function delivers the number of the choosen answer.
Therefor we should built our next codefragment like this:
$answer=("Which date should be used?","Today,%%sample_dt.ORD%%%,Other Date")
Wait! What are these cryptical things in the second answer choice?
When we want to display the value of a field we have access to, we use this description %%fieldname%%%. If we want to connet the value of to fields we use %%field1%%field2%%%.
Now we have to interpret the vaule of our $answer variable. This will be fullfilled by three If-clauses.
if($answer#=1)
$date=ldate_now()
endif
if($answer#=2)
$date=sample_dt.ORD
endif
if($answer#=3)
$date=askparam("Please enter the date:")
endif
As you can see we use the first described possibility for letting the user type in the prefered date.
The ldate_now() function returns the actual date. So now we have nearly everything to complete our first MPL program.
At the end we want to write the newly selected date back into the sample_dt.ORD field.
Therefor the whole code should look like this:
if ((ldate(recept_dt.ORD,"D2")-ldate(sample_dt.ORD,"D2"))#>X)
$answer=("Which date should be used?","Today,%%sample_dt.ORD%%%,Other Date")
if($answer#=1)
$date=ldate_now()
endif
if($answer#=2)
$date=sample_dt.ORD
endif
if($answer#=3)
$date=askparam("Please enter the date:")
endif
sample_dt.ORD=$date
endif
At the end of this post I will show you one last useful code fragment. No matter how good you write your MPL code, the day will come that you make a mistake. That's normal and okay but you don't want to build those failures into your live system.
To decrease the harms of a mistake you can put all of your newly MPL code in this If-clause:
if($42="XXX")
everything you code
endif
XXX stand for your short username. In the number register $42 the actual short user name is saved. Therefor every change made will only affect you and no one else.
If you got ideas, problems or feedback in any other form, dont hesitate an post it in the comments!
Because I dont think I will read the mails of this account often...
In the next post we will learn the differenz between DT.-1 and sample_dt.-1, it will be fun to know!!! :D
The second post is right incoming ;)
The last post ended with a question to you. What should we do in the If-Clause?
Well principially it is up to you. But we wanted to check if our OCR-device send us the right date, therefor we should ask the user what is the right thing at the moment.
So how to ask something? In MOLIS we have several possibilities to display messages onto the screen. The first is the function askparam() in which we could ask the value of anything we want. Like a date or the value of an analysis or the weigth of the patient... The other ist askmess(), which we will use in this problem.
The function askparam() uses two inputs. The first ist the question and the second are the possible answers. In return, the function delivers the number of the choosen answer.
Therefor we should built our next codefragment like this:
$answer=("Which date should be used?","Today,%%sample_dt.ORD%%%,Other Date")
Wait! What are these cryptical things in the second answer choice?
When we want to display the value of a field we have access to, we use this description %%fieldname%%%. If we want to connet the value of to fields we use %%field1%%field2%%%.
Now we have to interpret the vaule of our $answer variable. This will be fullfilled by three If-clauses.
if($answer#=1)
$date=ldate_now()
endif
if($answer#=2)
$date=sample_dt.ORD
endif
if($answer#=3)
$date=askparam("Please enter the date:")
endif
As you can see we use the first described possibility for letting the user type in the prefered date.
The ldate_now() function returns the actual date. So now we have nearly everything to complete our first MPL program.
At the end we want to write the newly selected date back into the sample_dt.ORD field.
Therefor the whole code should look like this:
if ((ldate(recept_dt.ORD,"D2")-ldate(sample_dt.ORD,"D2"))#>X)
$answer=("Which date should be used?","Today,%%sample_dt.ORD%%%,Other Date")
if($answer#=1)
$date=ldate_now()
endif
if($answer#=2)
$date=sample_dt.ORD
endif
if($answer#=3)
$date=askparam("Please enter the date:")
endif
sample_dt.ORD=$date
endif
At the end of this post I will show you one last useful code fragment. No matter how good you write your MPL code, the day will come that you make a mistake. That's normal and okay but you don't want to build those failures into your live system.
To decrease the harms of a mistake you can put all of your newly MPL code in this If-clause:
if($42="XXX")
everything you code
endif
XXX stand for your short username. In the number register $42 the actual short user name is saved. Therefor every change made will only affect you and no one else.
If you got ideas, problems or feedback in any other form, dont hesitate an post it in the comments!
Because I dont think I will read the mails of this account often...
In the next post we will learn the differenz between DT.-1 and sample_dt.-1, it will be fun to know!!! :D
Samstag, 25. Januar 2014
A humble start
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...
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...
Abonnieren
Posts (Atom)