IRC Chat : 2009-01-09 - OpenMRS

00:10:49 *** nribeka has joined #openmrs
02:21:56 *** nribeka has quit IRC
02:22:16 *** nribeka has joined #openmrs
02:37:04 *** upul has joined #openmrs
04:30:11 *** pearlbear has joined #openmrs
04:30:11 *** ChanServ sets mode: +v pearlbear
05:34:24 *** sgrannis has joined #openmrs
05:34:29 *** ChanServ sets mode: +v sgrannis
05:34:42 <sgrannis> nribeka: u there?
05:34:59 <nribeka> yes
05:35:02 <nribeka> hi sgrannis
05:35:04 <nribeka> :)
05:35:13 <sgrannis> hey -- u get my email?
05:35:55 <nribeka> ah yes
05:36:07 <nribeka> the holiday was great :)
05:36:33 <sgrannis> good.
05:36:58 <nribeka> do you see my pm?
05:54:05 *** sgrannis has quit IRC
06:14:10 *** pearlbear has quit IRC
08:09:53 *** nribeka1 has joined #openmrs
08:10:09 *** nribeka1 has left #openmrs
08:27:28 *** nribeka has quit IRC
11:27:14 *** upul has quit IRC
12:23:22 *** upul has joined #openmrs
12:35:17 *** james_regen has joined #openmrs
12:35:17 *** ChanServ sets mode: +v james_regen
12:45:18 *** upul_ has joined #openmrs
12:45:19 *** upul has quit IRC
12:57:48 *** upul_ is now known as upul
13:32:13 *** ndutta has joined #openmrs
13:33:08 <ndutta> hey upul
13:33:16 <ndutta> liquibase is nice
13:34:28 <upul> ndutta: yes it's clean
13:36:33 *** bmckown has joined #openmrs
13:36:33 *** ChanServ sets mode: +o bmckown
13:42:29 *** ndutta has quit IRC
13:45:53 <upul> bmckown: Hi
13:46:34 <bmckown> Hi, upul ! :-)
13:47:18 <upul> Does api.compile.classpath need the benerator jars?
13:47:37 <upul> I get compilation errors for ant install
13:47:47 <bmckown> :-\ Is that in a module?
13:48:04 <upul> bmckown: in the openmrs-trunk
13:48:30 <bmckown> hmm. let me look...
13:48:38 <upul> works okay if i add <fileset dir="${benerator.dir}" includes="*.jar" /> to api.compile.classpath in properties.xml
13:50:17 <bmckown> I have to update my local trunk...
13:50:29 <upul> first time r0bby sent the benerator to the mailng list I thought it was a joke, there were 2 bens in the class name :-)
13:51:19 *** bwolfe has joined #openmrs
13:51:19 *** ChanServ sets mode: +o bwolfe
13:55:23 <bmckown> u may be right upul.... just updated and trunk does not compile.
13:56:40 <bmckown> oh, yea if benerator is a new library it will need to have an entry there.
13:58:00 <bwolfe> sunbiz said it wasn't compiling either
13:58:07 <bwolfe> are you guys running java5 or java6 ?
13:58:16 <bwolfe> because it compiles for me...but I'm running java6
13:58:22 <upul> bwolfe: me java6
13:58:35 <bmckown> java6
13:59:15 <upul> bwolfe: i'm doing just ant install. may be inlcuding test may work or something
13:59:44 <upul> i saw it added to test path
14:00:09 <bmckown> what is "compile.optimize" in build.xml line 150?
14:01:27 <bwolfe> its pulling from build.properties
14:01:42 <bwolfe> it should be set to false
14:02:22 *** nribeka has joined #openmrs
14:58:17 *** bmckown_ has joined #openmrs
15:00:19 *** bmckown has quit IRC
15:15:06 *** atomicturtle has quit IRC
15:29:45 <bwolfe> upul: fixed the build error, thanks
15:29:52 *** bmckown has joined #openmrs
15:29:52 *** ChanServ sets mode: +o bmckown
15:30:29 *** nribeka1 has joined #openmrs
15:30:50 <upul> ok
15:35:19 *** nribeka has quit IRC
15:41:15 *** atomicturtle has joined #openmrs
15:46:08 *** bmckown_ has quit IRC
15:55:08 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [6576]: Fixing build error from previous commit <http://dev.openmrs.org/changeset/6576> || OpenMRS Changesets: Changeset [6575]: Merging trunk into branch logic [6409]:[6475] <http://dev.openmrs.org/changeset/6575> || OpenMRS Changesets: Changeset [6574]: Merging trunk into branch logic [6406]:[6409] <http://dev.openmrs.org/changeset/6574> || OpenMRS Changesets: Changeset [6573]: Merging trunk into branch logic [6224]:[6406] <http://dev.openmrs.org/changeset/6573>
16:36:20 *** upul has quit IRC
16:59:14 <nribeka1> bwolfe :)
16:59:31 <nribeka1> the first one is not an option
16:59:50 <nribeka1> the second one is the current implementation (joined-subclass)
17:00:31 <nribeka1> the third one using subclass (for the inheritance) and using join (to separate user and patient from the person table)
17:28:05 *** Echidna_ has joined #openmrs
17:31:58 *** Echidna has quit IRC
17:34:21 *** sprasanna has joined #openmrs
17:34:28 <sprasanna> bwolfe: hi ben :)
17:35:20 <sprasanna> bwolfe: one of my friends is interested in openmrs and she wants a good startup... any suggestions on where to start???
17:52:43 *** nribeka1 has quit IRC
17:59:39 *** sprasanna has quit IRC
18:22:47 *** sprasanna has joined #openmrs
18:22:57 *** glen_ has joined #openmrs
18:35:23 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [6577]: installer-nbi: Added openmrs-webapp panel for configuring runtime … <http://dev.openmrs.org/changeset/6577>
18:36:24 *** nribeka has joined #openmrs
19:07:28 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [6580]: installer-nbi: Latest IDE configuration for Tomcat <http://dev.openmrs.org/changeset/6580> || OpenMRS Changesets: Changeset [6579]: installer-nbi: Latest IDE configuration for JRE <http://dev.openmrs.org/changeset/6579> || OpenMRS Changesets: Changeset [6578]: installer-nbi: Changes for latest IDE configuration <http://dev.openmrs.org/changeset/6578>
19:07:56 *** nribeka has left #openmrs
20:10:04 *** sprasanna has quit IRC
21:02:40 *** nribeka has joined #openmrs
21:24:56 *** james_regen has quit IRC
21:45:43 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Changesets: Changeset [6582]: chica_module: rules that were changed in todays meeting <http://dev.openmrs.org/changeset/6582> || OpenMRS Changesets: Changeset [6581]: remoteregistration: Added service to create Infopath-compatible xml file. … <http://dev.openmrs.org/changeset/6581>
21:52:27 <nribeka> bwolfe
22:13:17 <nribeka> bmckown:
22:13:19 <nribeka> :D
22:13:29 <bmckown> hi, nribeka :D
22:13:38 <nribeka> hahaha there's bmckown to ask
22:13:47 <bmckown> :-)
22:14:22 * bmckown thinks nribeka is typing....
22:14:32 <nribeka> the getPatient(patientId)
22:14:42 <nribeka> the patient id is the key right?
22:14:57 <bmckown> sounds like it.
22:15:22 <nribeka> if we add person_id to the patient, which one going to be the key then bmckown?
22:15:57 <bmckown> didn't we have this discussion awhile ago? well the person_id=patient_id the way data model is set up now.
22:16:03 <OpenMRSBot> Recent updates in the world of openmrs: OpenMRS Tickets: Ticket #1199 (enhancement created): Support migration of hashed passwords and salt <http://dev.openmrs.org/ticket/1199>
22:16:28 <bmckown> but it seems that if you were to change the (be quite OpenMRSBot) change the datamodel then it would still be patient_id
22:17:37 <bmckown> and person_id is an autoincrement value. when patient is created it borrows the person_id for its own primary key.
22:18:20 <nribeka> haha lol (kill the bot)
22:18:52 <bmckown> I don't remember now... were you in on the discussion of wanting to change the datamodel so person and user would have different primary keys than person?
22:19:04 <nribeka> yes, i follow the discussion
22:19:22 <nribeka> the conclusion was adding person_id to both user and patient (i think)
22:19:27 <nribeka> and then changing the mapping
22:19:37 <bmckown> okay.
22:20:29 <bmckown> it would still seem best that primary key of patient would be only patient and not a superkey of patient_id, person_id. That would be redundant. And I think against good modeling practice.
22:20:41 <bmckown> pk=patient_id
22:20:52 <bmckown> fk=person_id
22:21:09 <nribeka> yes that what i want to do, but
22:21:26 <nribeka> hibernate doesn't allow subclass to have pk and fk
22:21:43 <nribeka> pk in hibernate is the id tag, right bmckown?
22:22:15 <bmckown> yea i think so.
22:22:34 <bmckown> well subclass could fk something else then for sure.
22:22:47 <bmckown> but u mean subclass cannot fk superclass in hibernate world?
22:23:12 <nribeka> subclass can fk superclass, but we can't add pk to subclass
22:23:35 <bmckown> but you wouldn't need to add the pk, cause you already have it.
22:23:37 <bmckown> right?
22:24:01 <nribeka> then we can't add the: pk = patient_id, fk = person_id
22:24:04 <nribeka> :(
22:24:23 <bmckown> why not? pk=patient_id right now for patient.
22:25:08 <bmckown> then just add an fk=person_id to the patient table, no?
22:25:47 <bmckown> (it seems like it should work. can't see why hibernate would complain)
22:27:04 <nribeka> adding person_id to fk --> <key><column name="person_id" /><column name="patient_id" /></key>
22:27:37 <nribeka> this will generate two fk ( i think)
22:28:10 <bmckown> you are making a superkey with both patient_id and person_id. why?
22:30:06 <nribeka> original mapping of the patient is this one: <key column="patient_id" not-null="true" on-delete="cascade" />
22:30:36 <nribeka> this will create fk to person table, right bmckown?
22:32:57 <bmckown> sorry, had a call for a sec...
22:33:12 <nribeka> ok :D
22:33:18 <bmckown> hehe
22:33:32 <bmckown> oh wait, nevermind...
22:33:40 <bmckown> okay i'm back.
22:34:14 <bmckown> i'm not sure it doesn't seem like that explicitly creates the fk, i would need to see.
22:34:23 <bmckown> other wise i had thought of adding:
22:35:15 <bmckown> <one-to-one name="personId" class="Person" column="person_id" />
22:35:46 <bmckown> but, yes, i'm not sure how that would play since we are already mapping it as a subclass.
22:36:08 <bmckown> good question, actually, eh?
22:37:32 <nribeka> hehe ... wouldn't it be redundant bmckown? because we already have fk from patient to person? :)
22:38:21 <bmckown> so the mapping understands the fk because it is a subclass?
22:38:35 <nribeka> yes :)
22:39:05 <bmckown> but there is no person_id in the patient table. argh.
22:39:35 <nribeka> current mapping will map patient_id to person_id
22:39:49 <nribeka> Patient --> Person
22:40:46 <bmckown> yes. but that's what you want to change, no?
22:40:53 *** bwolfe has quit IRC
22:42:59 <nribeka> yes, we don't want the shared key anymore :)
22:48:29 <bmckown> hmm.
22:48:47 * bmckown searching for an answer
22:50:20 <bmckown> there must be some mapping that does this right.
22:50:47 <nribeka> mapping per hierarchy --> no solution
22:51:01 <bmckown> Hibernate Book is not helping me right now.
22:52:57 <nribeka> mapping per hierarchy won't allow non null property on subclass but we have some non null property on subclass
22:53:07 <nribeka> so per hierarchy is not a solution
22:53:22 <nribeka> table per class is our current mapping ;)
22:53:47 <bmckown> What if you had a joined subclass, such as is ConceptNumeric to Concept, BUT instead of using concept_id as the key, using concept_numeric_id as the key.
22:54:11 <bmckown> (see Concept.hbm.xml to see what I'm suggesting)
22:54:11 *** jacobb has quit IRC
22:56:06 <bmckown> concept_numeric.precise is a non-null value on a joined subclass
22:57:19 <bmckown> So I'm suggesting the possibility that it might be necessary to remove the Patient.hbm.xml and fill it in under the Person.hbm.xml as a "joined-subclass"
22:58:23 <bmckown> and then give it <key column="patient_id" not-null="true" on-delete="i_am_not_sure" />
23:00:04 <bmckown> The other (hack) way I might think of is to try removing the "extends Person" from the Patient.hbm.xml and just try putting in person_id as a one-to-one relationship as foreign key
23:00:16 <nribeka> ah ok ok
23:00:22 <nribeka> i will give it a try
23:00:40 <bmckown> those are my 2 ideas but i don't know whether they will work or not.
23:00:54 <bmckown> and notice... the setter on patient.
23:00:59 <bmckown> and the constructor on patient.
23:01:14 <nribeka> my idea was mixing per class and per hierarchy but it's not working too
23:01:16 <nribeka> :(
23:01:20 <bmckown> cause currently it's setting the patient_id on person
23:01:45 <bmckown> yea... don't know if my ideas will work either.
23:02:31 <nribeka> setter on what bmckown?
23:02:46 <bmckown> on the Patient pojo
23:03:03 <bmckown> i meant constructor.
23:03:39 <bmckown> i meant the setter on setPersonId(Integer patientId)
23:03:43 <nribeka> if i want to change the mapping, i don't need to change the pojo, rigt bmckown?
23:04:10 <nribeka> i just need to change the mapping and (probably) the database structure?
23:04:45 <bmckown> No, I don't think so. Just that it probably might fail if you actually try to run the webapp with your new mapping because of the setters on the pojo right now.
23:05:17 <bmckown> I think the final solution will definitely include a change to the pojos.
23:08:32 <bmckown> This might be a stupid question... but do you have this?
23:08:34 <bmckown> http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd
23:08:36 <OpenMRSBot> <http://ln-s.net/2hTj> (at hibernate.sourceforge.net)
23:08:53 <bmckown> (view source)
23:10:08 <nribeka> yes
23:10:14 <nribeka> i have the dtd
23:10:49 <bmckown> thought so. just in case. BTW, the Hibernate Book talks about the mapping...
23:11:00 <bmckown> and says to look at that.
23:11:11 <bmckown> and that's *all* the book says about mapping.
23:11:35 <bmckown> lotta help, eh?
23:11:43 <nribeka> do you have the book?
23:11:47 <nribeka> what's the title?
23:13:05 <nribeka> hibernate documentation?
23:13:14 <bmckown> Yes, I have it. Java Persistence with Hibernate by Christian Bauer and Gavin
23:13:27 <bmckown> published by Manning.
23:13:45 <nribeka> hmmm i can get it on amazon kindle i think
23:13:45 <nribeka> :)
23:14:06 <nribeka> i use the hibernate in action :P
23:14:08 <bmckown> It's not always *tons* of help. but it's a nice book.
23:14:23 <bmckown> yea, this is just the next revision of hibernate in action.
23:14:33 <bmckown> they just changed the name.
23:15:00 <nribeka> ooo ic ic
23:15:28 <nribeka> i also read job interview for the dummies
23:15:30 <nribeka> lolz
23:15:38 <bmckown> heh.
23:15:50 <bmckown> um i like "Resumes that Knock Em Dead"
23:16:30 *** atomicturtle has quit IRC
23:16:48 <nribeka> is it good bmckown?
23:16:50 <nribeka> :D
23:16:56 <nribeka> sounds interesting ...
23:17:02 <bmckown> it has some good points.
23:17:28 <bmckown> approaches resume in a unique way i hadn't seen before reading it.
23:17:41 <nribeka> really ...
23:17:43 <bmckown> i'm using it to help my sister-in-law
23:18:33 <bmckown> okay one thing... change resume sentences that look like this:
23:18:56 <bmckown> "responsible for removal of coke product by drinking it"
23:19:04 <bmckown> to sentences like this
23:20:06 <bmckown> "increased office space by 50% introducing team implemented liquid reduction techniques"
23:20:37 <nribeka> wow ... the second one sounds really great
23:20:44 <nribeka> hahaha lol
23:20:49 <bmckown> :-)
23:20:52 <bmckown> it's a nice book.
23:21:06 <bmckown> but alas, i better get going. my fam is waiting on me.
23:21:29 <bmckown> ttyl, nribeka
23:21:39 <nribeka> ok ok bmckown
23:21:46 <nribeka> i'm off home too
23:21:59 <bmckown> k. go steelers i guess :-(
23:22:05 <bmckown> have a nice weekend.
23:22:11 <nribeka> haha ok
23:22:17 <nribeka> u2 bmckown :)
23:22:23 *** bmckown has quit IRC
23:25:57 *** nribeka has quit IRC
23:54:09 *** nribeka has joined #openmrs