Re: [freemed-development] Documentation for Freeemed 0.9

335 views
Skip to first unread message

Jeff

unread,
Jul 18, 2012, 10:02:01 AM7/18/12
to freemed-d...@googlegroups.com
On Tue, Jul 17, 2012 at 4:55 AM, charilaos13
<charis.s...@gmail.com> wrote:
> Is there any doc for Freemed v0.9? I need to create a module for codings e.g. ICD-10 - SNOMED-CT and I need the doc to understand the programming developmetn of Freemed.

It's pretty simple.

The DTDs are located in data/schema/mysql.
Example: https://github.com/freemed/freemed/blob/master/data/schema/mysql/pqri.sql

There's a "module definition", which is located in
lib/org/freemedsoftware/module
Example: https://github.com/freemed/freemed/blob/master/lib/org/freemedsoftware/module/CptCodes.class.php
Note that the UID *has* to be unique.

Lastly, there's an interface definition in
/ui/gwt/src/main/webapp/resources/interface
Example: https://github.com/freemed/freemed/blob/master/ui/gwt/src/main/webapp/resources/interface/CptCodes.module.xml

Make sure that you have a primary id field called "id", since
virtually everything is keyed from that.

To be involved with the development, clone the FreeMED tree on github,
and submit a pull request when you've finished. There's some install
documentation on the wiki:

https://github.com/freemed/freemed/wiki

(I believe there was some other documentation we've posted on the
lists, but I need to start collecting this in the github wiki...)

Let me know if you have any questions.

--
Thanks,
Jeff
(je...@freemedsoftware.org)
FreeMED Software Foundation, Inc
http://freemedsoftware.org/

朱宁

unread,
Jul 19, 2012, 12:50:22 AM7/19/12
to freemed-d...@googlegroups.com


2012/7/18 Jeff <fre...@gmail.com>
--
---

FreeMED; opensource electronic medical record and practice management
"Technology changes, people stay the same."
http://www.freemedsoftware.org/

You received this message because you are subscribed to the Google Groups "FreeMED Development" group.
To post to this group, send email to freemed-d...@googlegroups.com
To unsubscribe from this group, send email to freemed-develop...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/freemed-development?hl=en
Dear Jeff:
    I am a master in China.I am doing a Research on FreeMED's database.I want to know some details about database architecture,data types,management functions, maintenance efficiency and flexibility,field extension,
storage efficiency and interface standard.Looking forward to your suggestion.Thanks!               
                                                                                                                                                Ning.Zhu

charilaos13

unread,
Jul 19, 2012, 5:33:18 AM7/19/12
to freemed-d...@googlegroups.com
Dear Jeff,

If I understand correctly from the examples:
  • What is the pqri_source (Table name) stands for?
  • How do you know which unique key to assign to a module e.g.var $MODULE_UID = "884f604b-b5c0-475a-9cfa-5c912111f80e";?
  • Why are there two identical functions in the class CPTCodes.class e.g.
    protected function mod_pre ( &$data ) {
    $d['cptstdfee'] = serialize ( $d['cptstdfee'] );
    $d['cpttos'] = serialize ( $d['cpttos'] );
    }
  • About your last comment "clone the freemed tree from gihub". I didn't understand what you mean.
II apologize for asking too many questions but I have to know.

Thanks for the  quick response before.

Jeff

unread,
Jul 19, 2012, 10:17:35 AM7/19/12
to freemed-d...@googlegroups.com
On Thu, Jul 19, 2012 at 5:33 AM, charilaos13
<charis.s...@gmail.com> wrote:
> If I understand correctly from the examples:
>
> You are creating a subclass inherited from the superclass "SupportModule"
> e.g.
> https://github.com/freemed/freemed/blob/master/lib/org/freemedsoftware/module/CptCodes.class.php

That's correct. If a database table isn't considered an EMR
"attachment" (or part of the medical record), it descends from
SupportModule.

> Then you are creating a table to hold the values of that class e.g.
> https://github.com/freemed/freemed/blob/master/data/schema/mysql/pqri.sql

Correct.

> Then you are using XML for the interface. I thought the interface was in gwt
> (Google Web Tool Kit)

GWT doesn't allow certain dynamic functionality, due to the way it
works (compiling Java into Javascript). To get around this, I have a
UI builder class, which uses those XML definition files to create the
UI which is displayed to the user.

> What is the pqri_source (Table name) stands for?
> How do you know which unique key to assign to a module e.g.var $MODULE_UID =
> "884f604b-b5c0-475a-9cfa-5c912111f80e";?

Use "uuidgen" to generate a unique value. The only requirement is that
it's unique (and I prefer the output from uuidgen).

> Why are there two identical functions in the class CPTCodes.class e.g.
>
> protected function mod_pre ( &$data ) {
> $d['cptstdfee'] = serialize ( $d['cptstdfee'] );
> $d['cpttos'] = serialize ( $d['cpttos'] );
> }

You mean "add_pre" and "mod_pre"?

Those functions are meant to allow other functionality to be tied into
pre and post hooks for adding and modifying. If you don't need them
(and you probably won't), just leave them out.

> About your last comment "clone the freemed tree from gihub". I didn't
> understand what you mean.

Here's a brief explanation from the github guys:

https://help.github.com/articles/fork-a-repo

The gist of which is that you're supposed to create your own local
fork, from which you can push changes back to the main repository.

> II apologize for asking too many questions but I have to know.

It's the only way to learn, never apologize for asking questions.

charilaos13

unread,
Jul 19, 2012, 1:15:51 PM7/19/12
to freemed-d...@googlegroups.com
I need to create a class (probably more than one) that will get the input form the doctors nodes and give suggestions on the diagnosed diseases. e.g. Doctor's input-node: Patient presented fever, cold etc.
Output suggestion: <some codings available from ICD-10/SNOMED-CT> so as the doctor will choose the appropriate one.

By this, in my programming experience I need to get to the html-forms that have the field-variables and process them in my php classes or GWT classes.
Can you suggest one way to do this because I really struggle to find out how do you present (in html-form) the whole program and how do you access those fields so as to get the input?

Many thanks for everything and best regards,
Charis Soteriades

Jeff

unread,
Jul 19, 2012, 1:40:06 PM7/19/12
to freemed-d...@googlegroups.com
It's pretty simple in the current program's interface. If you're doing
it in raw GWT (as in, you're modifying the Java code), you would
simply use something like this (example taken from
https://github.com/freemed/freemed/blob/master/ui/gwt/src/main/java/org/freemedsoftware/gwt/client/screen/PatientForm.java
):

SupportModuleWidget primaryFacility = new
SupportModuleWidget("FacilityModule");
medicalTable.setWidget(0, 1, primaryFacility);

That instantiates a copy of the "widget" in your form.

If you're trying to use it via another table whose UI is defined as
per the XML interface format, you'd use something like this (example
taken from https://github.com/freemed/freemed/blob/master/ui/gwt/src/main/webapp/resources/interface/InsuranceCompanyModule.module.xml
):

<Element field="inscogroup" title="Insurance Company Group"
type="MODULE" options="InsuranceCompanyGroup"/>

or

<Element field="inscomod" title="Modifiers" type="MODULE_MULTIPLE"
options="InsuranceModifiers"/>

if you needed multiple elements to be able to be selected (which would
be returned as a comma separated list of values).
Reply all
Reply to author
Forward
0 new messages