Anise Seymour/Rx code

From Serenity : The Wiki
Jump to: navigation, search

The code

   &rx.fRx me=\[[ansi(g,Rx)]\] [v(0)]
   &rx.fformatsig me=[iter({get(me/rx._sig)}, switch({##}, i, one, ii, two, iii, three, iiii, four, v, five, vi, six, vii, seven, viii, eight, ix, nine, x, ten, adlib, as much as desired, po, by mouth, pr, by rectum, vag, vaginally, iv, intravenous, im, intramuscular, sc, subcutaneous {(under the skin)}, sl, under the tonge, top, topical {(on the skin)}, alt.h., every other hour, bid, twice daily, dieb.alt, every other day, prn, as needed, qd, daily, qh, hourly, tid, three times daily, qid, four times daily, min, minimal, max, maximal, ac, before meals, cc, with food, hs, at bedtime, pc, after meals, am, before noon, pm, in the afternoon, et, and, tab, tablet, tabs, tablets, inj, injection, nebul, a spray, prn, as needed, {##}))]
   &rx.fformatrxrx me=[align(2 10 58, %b, Rx, get(me/rx._rx))]%r[align(2 10 58, %b, Sig, get(me/rx._sig))]%r[align(2 10 58, %b, Disp, #[get(me/rx._disp)])]%r[align(2 10 58, %b, Refills, get(me/rx._refill))]
   &rx.fformatrxlabel me=%b%b[repeat(-, 68)]%r[align(4 64, %b, ansi(yh, Usage instructions))]%r[align(4 64, %b, ansi(g, get(me/rx._rx)))]%r[if(get(me/rx._caption), align(4 64, %b, ansi(g, get(me/rx._caption)))%r)][align(4 64, %b, u(rx.fformatsig))]%r[if(get(me/rx._note), iter(get(me/rx._note), align(>6 62, ansi(r,*), {##}), /,%r)%r)]%b%b[repeat(-, 68)]
   &rx.fformatrx me=%r%b%b[ansi(g, u(rx.fsubject))]%r[if(get(me/rx._cc), %b%b[ansi(g, Cc: [get(me/rx._cc)]%r)])]%r[u(rx.fformatrxrx)]%r%r[ufun(rx.fformatrxlabel)]%r%r[align(2 68, %b, eval(me, wave_sig))]%r
   &rx.fsubject me=Rx for [get(me/rx._rcpt)]: [get(me/rx._rx)]
   &rx.cmdnew me=$Rx/new *:@wipe me/rx._*; &rx._rcpt me=%0; think [u(rx.fRx, {New prescription for %0. Rx/cc <other recepients>. Rx/rx <medicine>.})]
   &rx.cmdrx me=$Rx/rx *:&rx._rx me=%0; think [u(rx.fRx, Rx %0. Rx/sig <sig>.)]
   &rx.cmdcc me=$Rx/cc *:&rx._cc me=%0; think [u(rx.fRx, Carbon copies to %0.)]
   &rx.cmdsig me=$Rx/sig *:&rx._sig me=%0; think [u(rx.fRx, Sig [u(rx.fformatsig)]. Rx/disp <dispense at once>.)];
   &rx.cmddisp me=$Rx/disp *:&rx._disp me=%0; think [u(rx.fRx, Disp #%0. Rx/refill <refills>.)];
   &rx.cmdrefill me=$Rx/refill *:&rx._refill me=%0; think [u(rx.fRx, {Refill %0. Rx/caption. Rx/note <note>. Rx/proof. Rx/send.})]
   &rx.cmdcaption me=$Rx/caption *:&rx._caption me=%0; think [u(rx.fRx, {Caption %0. Rx/note <note>. Rx/proof. Rx/send.})]
   &rx.cmdnote me=$Rx/note *:&rx._note me=%0; think [ufun(rx.fRx, {Note set. Rx/proof. Rx/send.})]
   &rx.cmdproof me=$Rx/proof:think ====\[[ansi(g,Rx preview)]\][repeat(=,62)]%r[u(rx.fformatrx)][repeat(=,78)]
   &rx.cmdsend me=$Rx/send:@mail/nosig %n [get(me/rx._rcpt)] [get(me/rx._cc)] = {[u(rx.fsubject)]}/{[u(rx.fformatrx)]}; think [u(rx.fRx, Sent.)]; rx/toss;
   &rx.cmdtoss me=$Rx/toss:@wipe me/rx._*; think [u(rx.fRx, Rx cleared.)]

And the docs

Step 1: Beginning a new Rx

The very first step to write an Rx is issue the Rx/new command. This command makes sure all data of previous prescriptions is wiped out and at the meanwhile it sets up for whom the prescription is meant.

Rx/new <name>

Example:

Rx/new John

Now you can go about writing the prescription for John.


Step 2: The medicine

Next, you enter which medicine you want to prescribe. You do that with the Rx/rx command.

Rx/rx <medicine>

Example:

Rx/rx Ibuprofen 400mg


Step 3: Signature

Each prescription consists of several parts, one of them being the signature. The signature normally tells the pharmasist what to write on the label of the dispensed medicine. Rx/, being cool as it is, lets you write the signature in Latin abbrevations, listed below.

Rx/sig <signature>

Example: > Rx/sig i tab po prn max vi tabs qd This will translate into: one tablet per mouth as needed maximal six tablets daily


Step 4: How much to dispense?

Pharmasists need to know how much of the medicine to give to the patient. If you want a patient to be stocked for a month with a medicine of which he takes 6 doses a day, he'll need to have 30 x 6 = 180 tablets. This can be set with the Rx/disp command.

Rx/disp <how much to dispense>

Example:

Rx/disp 180

Step 5: Refills

Sometimes you want a patient to be able to restock, for example if you have prescriped a monthly supply and you want to put him on a course that lasts three months, he'd get two refills. You can set this with Rx/refill.

Rx/refill <how many refills>

Example:

Rx/refill 2

Sometimes you want a patient to be able to get refills as needed. A common abbreviation for this is prn, which stands for pro re nata. It is Latin for 'as needed':

Rx/refill prn

And sometimes you don't want refills at all. 'Non rep.' is short for 'non repitur', or 'no repeats'.

Rx/refill non rep.


Step 6: A caption

The label on the medicine will need a caption, telling the patient what the medicine actually is. To stick with our Ibuprofen example of above, you could set it to Painkiller.

Rx/caption 

Example:

Rx/caption Painkiller tablets


Step 7: Additional notes

In some cases you want to write some additional notes. Things that would, in the real world, be printed on the leaflet that comes with the medicine. Rx/ allows you to set these notes with Rx/note. Give a slash-delimited list of extra instructions.

Rx/note <slash-delimted list of instructions>

Example:

 Rx/note Do not mix with alcohol./Do not operate vehicles or other potentially dangerous machines while under influence of the medicine./Do not use during pregnancy./Do not use in combination with birth control medication.

Step 8: Additional recepients

You're soon going to send the prescription to your patient, but maybe there are some other people you'd like to see the prescription as well, for example their general physician or another doctor you know is treating your patient, or their guardian, or anyone else at your discretion. The Rx/cc command easily lets you do this.

Rx/cc <additional recepients>

Example:

Rx/cc DrWho


Step 9: Preview the prescription

Before you send the medicine you might want to check if everything looks alright. Rx/proof let's you do this.

Rx/proof

If you have set your wave signature it will be appended to the bottom of your prescription automatically. Nifty, huh? Set one now if you haven't already and check Rx/proof again. Suggestion: include your name, your speciality, and the primary organisation you work for in your signature.


Step 10: Send it

The time has come to send the prescription. Rx/send sends copies to yourself, your patient, and anyone you listed with Rx/cc in >step 8<.

Rx/send

That's it!

Additionally, there is one more command and you use it if you just want to reset all data without sending anything. Think of it as a reset button.

Rx/toss

Overview of the commands

Rx/new <character>     Begins a new Rx
Rx/rx <medicine>       Sets the medicine
Rx/sig <signature>     Sets usage instructions, using Latin abbreviations
Rx/disp <dispose>      Tells pharmasist how many doses to dispense
Rx/refill <refills>    Sets how many refills patient should get
Rx/caption <caption>   Sets a caption for the label to be printed
Rx/note <notes>        Slash-delimited list of additional instructions
Rx/cc <cc>             Space-delimted list of additional recepients
Rx/proof               Preview the prescription
Rx/send                Sends the prescription to you, patient, and Cc
Rx/toss                Cancel the prescription


Latin abbreviations

Currently, Rx/ translates the following abbreviations in the Rx/sig command.

Amount

   i       one
   ii      two
   iii     three
   iv      four
   iiii    four
   v       five
   vi      six
   vii     seven
   viii    eight
   ix      nine
   x       ten
   adlib   as much as desired

Route

   po      by mouth
   pr      by rectum
   vag     vaginally
   IV      intravenous
   IM      intramuscular
   SL      under the tongue
   SC      subcutaneous (under the skin)
   top     topical (on the skin)

Frequency

   alt.h.  every other hour
   bid     twice daily
   dieb.alt    every other day
   prn     as needed
   qd      daily
   qh      hourly
   tid     three times daily
   qid     four times daily
   min     minimal
   max     maximal

Time

   ac      before meals
   cc      with food
   hs      at bedtime
   pc      after meals
   am      before noon
   pm      in the afternoon

Misc.

   et      and
   inj     injection
   nebul   a spray
   tab     tablet
   tabs    tablets
   prn     as needed