<div dir="ltr"><div>Thanks Henry</div><div><br></div><div>That's exactly what I was interested in. I'm at work at the moment (Australia), but will have a bit more of a look later tonight</div><div><br></div><div>But I have an interest in the health sector, and would be interested in contributing to a public domain project, especially if we can make something neat / quick. I imagine others may be interested too.</div>
<div><br></div><div>The reason I asked to see the big picture is that often in software development a bit more context helps. E.g. Maybe parts of your existing database can be sucked in and re-purposed.</div><div><br></div>
<div>Dan</div>
<div><br><br></div><div class="gmail_extra"><div class="gmail_quote">On Thu, Jul 31, 2014 at 10:49 AM, Henry Lenzi <span dir="ltr"><<a href="mailto:henry.lenzi@gmail.com" target="_blank">henry.lenzi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">Hi Daniel --<br>
<br>
Do you mean the Forth files?<br>
I don't belienve they would make much sense to you, but it would go<br>
something like this (as you can see, that is a FORTH definition):<br>
<br>
: NAME S"John Doe"<br>
CU4<br>
HCTZ25 30P 1CPM<br>
OMZ20 30P 1CPM INSTOMZ<br>
SIMVA20 30P 1CPN<br>
L\D ;<br>
<br>
Expands to (NOTE: Some things are germane to our public health<br>
system, such as renewing "continuous use" gratis medications, recipe<br>
valid for 4 months):<br>
<br>
John Doe<br>
<br>
Continuous use - 4 months<br>
<br>
Hydrochlorothiazide 25mg ---------------- 30 pills<br>
<br>
Take 1 pill P.O. in the morning.<br>
<br>
Omeprazol 20mg ----------------------------- 30 pills<br>
<br>
Take 1 pill P.O. in the morning, 1/2 hour<br>
before breakfast.<br>
<br>
Simvastatin 20mg ---------------------------- 30 pills<br>
<br>
Take 1 pill P.O. at night.<br>
<br>
City, xx/xx/xxxx<br>
<br>
<br>
So what´s happening here is that inside the FORTH definition,<br>
everything delimited by ":" and ";" is a FORTH word, as they say, that<br>
is to say, valid FORTH code.<br>
The very cheap trick here is simply writing a file with plain text<br>
(but called .fth, .f or other FORTH designations for filetypes)<br>
begining with a ":", ending with a ";", and everything in between,<br>
which are the FORTH words.<br>
The FORTH reader than opens this file. As soon as it hits the ":", it<br>
recognizes it's FORTH code. It's all amazingly stupid. However, what<br>
you get is: a DSL hassle-free (no parsing/lexing), a flat-file<br>
database for free (the name of the files), an interpreter (comes with<br>
the territory). And code is data, data is code, in a very, very<br>
concrete way.<br>
<br>
<br>
Cheers,<br>
<br>
Henry Lenzi<br>
<div><div><br>
<br>
<br>
<br>
<br>
<br>
On Wed, Jul 30, 2014 at 6:29 PM, Daniel Prager<br>
<<a href="mailto:daniel.a.prager@gmail.com" target="_blank">daniel.a.prager@gmail.com</a>> wrote:<br>
> Hi Henry<br>
><br>
> Racket is very suitable for writing DSLs, or even whole Ls (more advanced!).<br>
> As you'd expect, the idioms for DSL construction in straight Racket are<br>
> different from those in Forth and will take a bit of familiarization and<br>
> adjustment.<br>
><br>
> Would you be willing to share a more fully-fledged example of a shorthand<br>
> medical recipe (input) and reconstructed recipe (output) so that the Racket<br>
> Community can better understand what sounds like a very worthwhile project?<br>
><br>
><br>
> Dan<br>
><br>
><br>
> On Tue, Jul 29, 2014 at 6:21 AM, Henry Lenzi <<a href="mailto:henry.lenzi@gmail.com" target="_blank">henry.lenzi@gmail.com</a>> wrote:<br>
><br>
>> Of course, the ultimate purpose would be to re-evaluate the imported<br>
>> symbol and reconstruct a medical recipe. The purpose of these<br>
>> baby-steps exercises is porting a medical recipe program I've written<br>
>> originally in Forth that allowed me to service 5.000 patients creating<br>
>> a little database of shorthand recipes that then expand into real<br>
>> medical recipes. I got hundreds of patients on renewable recipes for,<br>
>> say, hypertension. Hand writing is no fun. Typing them in Word is no<br>
>> fun. The hospital has is its own software, but it's is a load of<br>
>> baloney, extremely buggy, if you ask me, so I'm rolling my own again,<br>
>> except I want to print directly on the model paper our service uses,<br>
>> so I want graphics like Racket Scheme has (very good capabilities, as<br>
>> far as my needs are concerned).<br>
>><br>
>> With Forth, it's very easy to design DSLs, because there's no syntax<br>
>> and you get a lot of advanced features for free. For instance, there's<br>
>> no need to write a parser for my little language. However, since Forth<br>
>> implementations fall short of dealing with images, graphics (unless<br>
>> you take the royal road to pain and learn to program for the Win32 API<br>
>> and how it works for a particular Forth vendor), I'm looking at Racket<br>
>> Scheme.<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr"><div style="font-family:arial;font-size:small"><b>Daniel Prager</b></div><div style="font-family:arial;font-size:small">Agile/Lean Coaching, Software Development and Leadership<br>
</div><div style="font-family:arial;font-size:small"><font color="#999999">Startup: </font><font color="#000000"><a href="http://www.youpatch.com" target="_blank">www.youpatch.com</a></font></div><div style="font-family:arial;font-size:small">
<font color="#999999">Twitter:</font> <a style="color:rgb(17,85,204)" href="https://twitter.com/agilejitsu" target="_blank">@agilejitsu</a> </div><div style="font-family:arial;font-size:small"><font color="#999999">Blog:</font> <a style="color:rgb(17,85,204)" href="http://agile-jitsu.blogspot.com/" target="_blank">agile-jitsu.blogspot.com</a></div>
</div>
</div></div>