IRC Chat : 2011-06-23 - OpenMRS

00:03:28 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (trunk): Follow up after code review to Can't create encounter from administration screen - TRUNK-2349 <http://feedproxy.google.com/~r/OMRStrunk/~3/vS6-4M4VvgA/OpenMRS> || New Changeset: OpenMRS (order-entry): Refactor Order and DrugOrder classes - TRUNK-2360 <http://feedproxy.google.com/~r/OMRStrunk/~3/4uiuauqtqe8/OpenMRS> || New Changeset: OpenMRS (order-entry): Fixed javadoc within DrugOrder - TRUNK-2387 <http://feedproxy.google.com/~r/OMRStrunk/~3/xiXe3UTuY70/OpenMRS>
00:12:33 *** dmexs has quit IRC
00:25:15 *** wyclif has quit IRC
00:48:36 *** jportela has left #openmrs
00:49:17 *** vlad__ has joined #openmrs
00:50:54 *** vlad____ has quit IRC
00:56:38 *** mandric has joined #openmrs
01:07:06 *** dmexs has joined #openmrs
01:10:38 *** wyclif has joined #openmrs
01:10:42 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (order-entry): Follow up to, Refactor Order and DrugOrder classes to add a constructor that takes in an orderable - TRUNK-2360 <http://feedproxy.google.com/~r/OMRStrunk/~3/84jioagTqGY/OpenMRS>
02:07:24 *** wyclif has quit IRC
02:17:35 *** vlad__ has quit IRC
02:28:46 *** wyclif has joined #openmrs
02:41:39 *** vlad___ has joined #openmrs
02:45:48 *** surangak has joined #openmrs
02:51:38 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (order-entry): Applying code review comments for - TRUNK-2360 <http://feedproxy.google.com/~r/OMRStrunk/~3/gFYRmMMGIm4/OpenMRS>
03:23:09 *** gbastien has quit IRC
03:41:52 *** upul` has joined #openmrs
03:41:52 *** ChanServ sets mode: +v upul`
04:22:36 *** vlad___ has quit IRC
04:35:10 *** mccallumg has joined #openmrs
04:35:10 *** ChanServ sets mode: +v mccallumg
04:35:53 <mccallumg> hi surangak
04:36:37 <surangak> mccallumg, helllo
04:37:19 <mccallumg> surangak: I see your slides on connect ...
04:37:44 <surangak> mccallumg, aha, i was having a trial this morning...
04:37:54 <mccallumg> surangak: whoops. no, that was me sharing
04:38:34 <mccallumg> surangak: are you able to get on connect?
04:38:36 <surangak> mccallumg, i connected now... can u see my set of slides on adobe
04:38:47 <mccallumg> Yes. I see them
04:38:54 <surangak> mccallumg, yep, seems to work fine for me today...
04:39:00 <mccallumg> surangak: I don't see you on skype.
04:40:25 <surangak> mccallumg, mmm.. im online...
04:41:04 <surangak> mccallumg, im seeing you as 'call forwarding'
04:55:05 <robbyoconnor> hey all
05:01:41 <mccallumg> hey robbyoconnor . sorry, I can't chat right now. I hope everything is going well for you.
05:02:33 *** mccallumg has quit IRC
05:03:45 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (concept_mappings): Adding useful comments in the save methods for concept map type and reference term <http://feedproxy.google.com/~r/OMRStrunk/~3/gMDqv6FYE-U/OpenMRS>
05:13:44 *** dmexs has quit IRC
05:23:40 *** bwolfe has quit IRC
05:31:17 *** bwolfe has joined #openmrs
05:31:17 *** ChanServ sets mode: +o bwolfe
05:35:59 *** dkayiwa has joined #openmrs
06:07:33 *** mandric has quit IRC
06:10:21 *** bwolfe has quit IRC
06:17:27 *** bwolfe has joined #openmrs
06:17:27 *** ChanServ sets mode: +o bwolfe
06:23:18 *** bwolfe has quit IRC
06:36:29 *** Echidna has quit IRC
06:40:43 *** Echidna has joined #openmrs
06:40:43 *** ChanServ sets mode: +v Echidna
06:50:00 *** rafa has joined #openmrs
06:50:00 *** ChanServ sets mode: +v rafa
07:22:31 *** pascal` has joined #openmrs
07:27:58 *** suho has joined #openmrs
07:27:58 *** ChanServ sets mode: +v suho
07:33:01 *** ChanServ sets mode: +v pascal`
07:33:13 <pascal`> hi dkayiwa, around?
07:42:47 <dkayiwa> hi pascal
07:42:48 <dkayiwa> yes
07:43:04 *** danielf` has joined #openmrs
07:43:04 *** ChanServ sets mode: +v danielf`
07:48:05 <pascal`> hi dkayiw
07:48:11 <dkayiwa> hey
07:48:12 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (providers): Using annotation for provider controller. TRUNK-2253 <http://feedproxy.google.com/~r/OMRStrunk/~3/CYPNKGKsriQ/OpenMRS> || New Changeset: OpenMRS (order-entry): Correcting javadoc on getOrderHistoryByConcept - TRUNK-2385 <http://feedproxy.google.com/~r/OMRStrunk/~3/RtdihaITDUs/OpenMRS>
07:48:24 <pascal`> dkayiwa, we're seeing a strange issue which I'm sure we've seen before but I can't remember what we did about it
07:48:33 <dkayiwa> ok
07:48:44 <pascal`> dkayiwa, we added a new question (which consists of multiple check boxes and dropdowns)
07:49:01 <pascal`> dkayiwa, but if we only complete those questions, no obs are created
07:49:15 <pascal`> dkayiwa, however, if we then go and _edit_ the form, things are saved fine
07:49:21 <dkayiwa> oh
07:49:28 <pascal`> dkayiwa, does that ring a bell?
07:49:40 <dkayiwa> can u send me the form?
07:49:49 <dkayiwa> and tell me the offending questions?
07:49:57 <pascal`> dkayiwa, yeah, sure
07:50:08 <pascal`> dkayiwa, just file -> save as from the designer?
07:50:27 <dkayiwa> yes
07:53:14 <pascal`> dkayiwa, sent.
07:54:20 <dkayiwa> ok
07:54:49 <pascal`> dkayiwa, I'm seeing very strange things. It looks like nothing is being saved on initially completing the form since adding those questions.
07:54:56 <pascal`> dkayiwa, nothing in the logs either =S.
07:55:24 <dkayiwa> ok
07:58:12 *** suho has quit IRC
07:58:21 <pascal`> dkayiwa, but on editing, things seem to save ok
07:58:35 <dkayiwa> strange
07:58:52 <pascal`> dkayiwa, I know (=
08:00:32 <pascal`> dkayiwa, we're on 4.0.3.3
08:01:28 <dkayiwa> ok
08:02:37 <pascal`> dkayiwa, to summarize what I'm seeing: No obs are saving on the initial form submit (but an encounter is created), then on an edit, everything seems find.
08:02:51 <pascal`> dkayiwa, I'm still testing and douebl checking, but that's what I'm seeing at the moment.
08:03:10 <dkayiwa> ok
08:04:14 <dkayiwa> Question6?
08:04:33 <pascal`> dkayiwa, yeah
08:04:36 <dkayiwa> pascal: is that the question text?
08:04:43 <pascal`> dkayiwa, the long one :)
08:04:52 <dkayiwa> am trying to look for it
08:04:57 <dkayiwa> is it at the bottom
08:04:58 <pascal`> dkayiwa, "Question 6 of 44"
08:05:10 <dkayiwa> what name under form fields?
08:05:17 <pascal`> dkayiwa, I'm not sure of the layout of that XML
08:05:34 <pascal`> dkayiwa, all the form fields state with "Muscle soreness"
08:05:40 <dkayiwa> ok
08:05:46 <pascal`> dkayiwa, sorry, "Muscle Soreness"
08:06:11 <pascal`> dkayiwa, all the muscle soreness questions are grouped together as question 6. There's a check box and a dropdown for each type of muscle.
08:06:23 <dkayiwa> Muscle Soreness Rating - Biceps?
08:06:40 <pascal`> dkayiwa, yeah, that's the first dropdown.
08:07:15 <pascal`> dkayiwa, the format is: <Muscle Type> [ ] [
08:07:33 <pascal`> dkayiwa, So, for each muscle type, there's a text label, then a check box and a dropdown... all on the same row.
08:07:34 <dkayiwa> ok
08:07:37 <pascal`> dkayiwa, am I making sense?
08:09:43 <dkayiwa> i suspect it could be changing obs node to _3._obs
08:09:54 <dkayiwa> though i have not confirmed it yet
08:10:06 <pascal`> dkayiwa, ah, will take a look
08:10:53 <pascal`> dkayiwa, but all of the questions have always had the node called _3._obs
08:10:58 <pascal`> dkayiwa, is that not what it's supposed to be?
08:11:05 *** suho has joined #openmrs
08:11:05 *** ChanServ sets mode: +v suho
08:11:44 <dkayiwa> will need to first confirm. but just wondering how it changed from obs to _3._obs
08:12:29 <pascal`> dkayiwa, not sure, but it's always been that for us afaik
08:12:55 <dkayiwa> ok
08:18:04 *** vlad___ has joined #openmrs
08:22:33 <pascal`> dkayiwa, could it be something to do with hyphens in concept names?
08:22:43 <dkayiwa> ummm
08:23:37 <pascal`> dkayiwa, I'm just guessing because those new concepts are the only ones with hyphens in their names
08:23:45 <dkayiwa> ohhh
08:23:56 <pascal`> dkayiwa, and I remember there have been some escaping issues before
08:24:05 <dkayiwa> yes
08:24:13 <pascal`> dkayiwa, it doesn't explain why the edit works though
08:24:44 <danielf`> dkayiwa, pascal`, there are also brackets in the concept names
08:24:51 <dkayiwa> edit does not go through the hl7 engine
08:25:04 <dkayiwa> oh highly likely
08:25:21 <dkayiwa> what is the actual concept name?
08:25:59 <pascal`> danielf`, yeah, the parentheses cause issues when creating the schema's I think
08:26:03 <dkayiwa> you are almost convincing be that it could be so
08:26:30 <pascal`> dkayiwa, one of the concept names is: Muscle Soreness Rating - Gluteus
08:26:38 <pascal`> dkayiwa, but they're all similar, and all have hyphens
08:26:45 <dkayiwa> ok
08:27:07 <danielf`> Muscle Soreness Shoulders Rating - Anterior (Front)
08:27:11 <danielf`> as another example
08:27:27 <dkayiwa> and it is only those with hyphens that fail?
08:27:27 * pascal` reminds everyone that Gluteus == butt ^_^
08:27:35 <pascal`> dkayiwa, no
08:27:40 <dkayiwa> ok
08:27:52 <pascal`> dkayiwa, since we added those, no obs are ever being saved on the initial form submit
08:27:58 <pascal`> dkayiwa, only on the edit
08:28:14 <dkayiwa> and the tomcat logs have nothing?
08:29:06 <pascal`> dkayiwa, nope
08:29:31 <pascal`> dkayiwa, well, only INFO logs
08:29:38 <dkayiwa> ok
08:30:03 <pascal`> dkayiwa, INFO - LoggingAdvice.invoke(102) |2011-06-23 10:28:05,994| In method EncounterService.saveEncounter. Arguments: Encounter=Encounter: [66 Thu Jun 23 00:00:00 SAST 2011 ADULTINITIAL Unknown Location 15 Athletics (Field) num Obs: [Obs #1905, Obs #1904, Obs #1907, Obs #1906, Obs #1908, Obs #1896, Obs #1897, Obs #1898, Obs #1899, Obs #1900, Obs #1901, Obs #1902, Obs #1903, Obs #1888, Obs #1889, Obs #1890, Obs #1891, Obs #1892, Obs
08:30:04 <pascal`> #1893, Obs #1894, Obs #1895, Obs #1883, Obs #1882, Obs #1881, Obs #1880, Obs #1887, Obs #1886, Obs #1885, Obs #1884, Obs #1875, Obs #1874, Obs #1873, Obs #1879, Obs #1878, Obs #1877, Obs #1876] num Orders: 0 ]
08:30:28 <dkayiwa> do the other forms work well?
08:31:45 <pascal`> dkayiwa, I think so, I'll test another one quickly.
08:34:01 <pascal`> dkayiwa, yeah, I get obs created on the initial submit for another form without those new concepts
08:35:17 <dkayiwa> ok
08:40:05 <pascal`> dkayiwa, I don't think it's the hyphen
08:40:29 <pascal`> dkayiwa, I created a test form with just one of the muscle soreness questions (checkbox + dropdown) and that works fine.... ='
08:40:30 <pascal`> =\
08:42:21 <pascal`> dkayiwa, when it works... in the logs I see: In method HL7Service.encounterCreated
08:42:31 <dkayiwa> ok
08:42:32 <pascal`> dkayiwa, which doesn't show up when it fails... not sure if that helps...
08:42:39 <dkayiwa> yes it does
08:43:49 <pascal`> dkayiwa, in my test form, I'm using the default dropdown rendering for the boolean concept, but in the proper form, I'm using a checkbox
08:44:03 <pascal`> dkayiwa, I'll test the checkbox now
08:46:02 <dkayiwa> ok
08:46:25 <pascal`> dkayiwa, checkbox works
08:50:41 <dkayiwa> strange
09:00:33 <dkayiwa> pascal` after the offending form has submitted successfully, could you send me the xml file in the archive folder?
09:00:48 <dkayiwa> i just want to see if it has the selected answers
09:01:09 <pascal`> dkayiwa, you mean after the edit?
09:01:22 <dkayiwa> after the process where form does not save
09:01:27 <dkayiwa> values
09:01:30 *** vlad___ has quit IRC
09:02:10 <pascal`> dkayiwa, so submitted _un_successfully then?
09:02:24 <dkayiwa> yes :)
09:02:30 <pascal`> dkayiwa, where is the archive folder?
09:02:36 <pascal`> dkayiwa, in Ubuntu
09:02:46 <dkayiwa> user home
09:03:07 <dkayiwa> -xforms-archive
09:03:58 <pascal`> dkayiwa, hmm... I'm not seeing it
09:04:01 <pascal`> dkayiwa, I'll look around
09:04:34 *** vlad__ has joined #openmrs
09:04:41 <dkayiwa> where is your run time properties file?
09:04:49 <pascal`> /usr/share/tomcat6/.OpenMRS/xforms/archive <- is this is dkayiwa?
09:04:55 <dkayiwa> yes
09:05:09 <pascal`> dkayiwa, kk, just a sec
09:05:22 <pascal`> dkayiwa, I guess you want me to actually fill in answers for those questions?
09:05:28 <dkayiwa> yes
09:05:32 <pascal`> dkayiwa, because the form doesn't save whether those questions have answer or not
09:05:34 <pascal`> dkayiwa, kk
09:06:52 *** vlad__ has quit IRC
09:08:01 *** vlad___ has joined #openmrs
09:08:23 <dkayiwa> the other option would be creating a new form and give it only those offending questions and then see if it can save well
09:08:31 *** vlad___ has quit IRC
09:09:26 <pascal`> dkayiwa, done.
09:09:40 <dkayiwa> can u send me the xml from the archive folder
09:09:43 <dkayiwa> ?
09:09:47 <pascal`> dkayiwa, I did that already like I said above.
09:09:49 <pascal`> dkayiwa, sent.
09:09:53 <dkayiwa> ok
09:10:35 *** rafa has quit IRC
09:12:26 <dkayiwa> are you able to try a smaller form? With the exact offending concepts?
09:13:54 <pascal`> dkayiwa, we're working on that.
09:14:01 <dkayiwa> ok
09:14:08 <pascal`> dkayiwa, I do see this when I turn on DEBUG logging: ERROR - ORUR01Handler.getConcept(873) |2011-06-23 11:13:01,553| Unable to find concept with code: null and mapping: null in hl7 message with uid: 85YsSsxvYeio0qhCRSsN
09:14:41 <dkayiwa> that makes alot of sense
09:15:04 <dkayiwa> because the failing piece is in hl7
09:15:28 <pascal`> dkayiwa, ok, I'm seeing HL7Service.encounterCreated in the logs now... I must have just missed it before =\ sorry
09:15:36 <dkayiwa> ok
09:18:46 <pascal`> dkayiwa, is there a way to see that HL7 message with the error?
09:18:58 <pascal`> dkayiwa, then maybe I can identify why there's a null concept
09:19:07 <pascal`> dkayiwa, or which one is null
09:19:14 *** bryq has joined #openmrs
09:19:14 *** ChanServ sets mode: +v bryq
09:19:22 <dkayiwa> i have no idea
09:23:35 <pascal`> dkayiwa, I found the hl7 message, but it's almost impossible to decipher.
09:24:13 <dkayiwa> yes the hl7 messages are not obvious
09:28:11 *** suho has quit IRC
09:28:58 <pascal`> dkayiwa, I'm getting into ORUR01Handler.getConcept() with hl7ConceptId=null and codingSystem=null
09:29:08 <pascal`> dkayiwa, does that make sense?
09:29:13 <pascal`> dammit, where's chopin
09:29:33 <dkayiwa> oh yes
09:30:30 <pascal`> dkayiwa, this is the HL7 message if you're interested: http://pastie.org/2110335
09:30:40 <dkayiwa> oh thanks alot!!1
09:31:12 <pascal`> dkayiwa, to get that, I just filled out the very first question on the form
09:31:22 <pascal`> dkayiwa, nothing to do with the muscle soreness questions
09:31:30 <dkayiwa> ok
09:32:44 <pascal`> dkayiwa, I'm stepping though the HL7 stuff now, but I'm not really sure what to look for...
09:33:03 <dkayiwa> ok
09:33:08 <pascal`> dkayiwa, it does seem like the error in the logs is dude to a malformed HL7 message... but that's about all I can tell at this stage.
09:33:18 <dkayiwa> ok
09:37:57 <dkayiwa> pascal` did you put a break point in ORUR01Handler.getConcept()
09:38:17 <dkayiwa> line 907
09:38:18 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (order-entry): Adding patient parameter to discontinueOrderByConcept method - TRUNK-2385 <http://feedproxy.google.com/~r/OMRStrunk/~3/fJtf16xZswA/OpenMRS>
09:39:23 <pascal`> dkayiwa, um, I'm working with 1.7.x
09:39:45 <dkayiwa> does it have that class?
09:39:53 <dkayiwa> though the line number may be different
09:40:15 <pascal`> dkayiwa, yeah, but the error is happening on 873
09:40:20 <dkayiwa> ok
09:40:27 <pascal`> dkayiwa, because those two things I mentioned about are null
09:40:32 <pascal`> \8about-above
09:40:35 <dkayiwa> ok
09:40:52 <pascal`> that last line is supposed to be: *about=above
09:41:06 <dkayiwa> ok
09:43:59 <pascal`> dkayiwa, is that (the parameters being null) the actual problem do you think?
09:44:34 <dkayiwa> if that error log happens only when submitting this form but not others, then most likely
09:45:22 <pascal`> dkayiwa, ah, let me check that
09:45:34 <pascal`> dkayiwa, then I can also compare the HL7
09:45:39 <dkayiwa> ok
09:47:48 <pascal`> dkayiwa, neither of those parameters are null when things are working.
09:48:00 <dkayiwa> ok
09:52:04 <pascal`> dkayiwa, the working message has: 1238^MEDICAL RECORD OBSERVATIONS^99DCT
09:52:11 <pascal`> dkayiwa, and then all the obs
09:52:27 <pascal`> dkayiwa, importantly (I think), it has the 99DCT coding system thing
09:52:32 <dkayiwa> yes
09:53:43 <pascal`> dkayiwa, does the xforms module construct the hl7?
09:53:58 <dkayiwa> no
09:54:04 <dkayiwa> openmrs core does so
09:54:22 <dkayiwa> all i do is submit form xml to it and it takes care of the rest
09:54:41 <dkayiwa> same thing that ms infopath does
09:56:54 <pascal`> hmm
09:57:30 <pascal`> dkayiwa, do you know where that happens?
09:57:42 <pascal`> dkayiwa, then maybe I can step through openmrs code.
09:59:28 <dkayiwa> do u have the ORUR01Handler class?
10:00:06 <pascal`> dkayiwa, yeah I have the whole codebase.
10:00:22 <pascal`> dkayiwa, is that where it is?
10:00:32 <dkayiwa> look at its processMessage
10:00:36 <pascal`> dkayiwa, cool
10:04:36 <pascal`> dkayiwa, in the Message parameter.....
10:04:58 <pascal`> dkayiwa, can I get the full text of the message (if such a thing exists) so we can see if the error is already present at this point?
10:05:14 <dkayiwa> let me see
10:08:55 *** goutham has joined #openmrs
10:08:59 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (order-entry): Checking if an order has been activated before it can be filled - TRUNK-2385 <http://feedproxy.google.com/~r/OMRStrunk/~3/V0BKXKN22_M/OpenMRS> || New Changeset: OpenMRS (order-entry): Adding patient parameter to getOrderHistoryByConcept method - TRUNK-2385 <http://feedproxy.google.com/~r/OMRStrunk/~3/x9_5M78MdII/OpenMRS>
10:18:57 <pascal`> dkayiwa, we've noticed something else
10:19:04 <dkayiwa> aha
10:19:37 <pascal`> dkayiwa, we can only save the offending form when logged in as System Admin
10:19:54 <dkayiwa> ohhhhhhhhh
10:20:06 <dkayiwa> could it be a permissions thing?
10:20:09 <pascal`> dkayiwa, I think one of the widgets might not be bound
10:20:29 <dkayiwa> does that widget also save when admin?
10:21:06 <pascal`> dkayiwa, I'm not sure if that's the case, just taking a look now
10:21:13 <dkayiwa> ok
10:21:34 <dkayiwa> what role has the user when form does not save?
10:21:45 <dkayiwa> why does the same role save well for other forms?
10:25:14 <pascal`> dkayiwa, it doesn't save well
10:25:20 <pascal`> dkayiwa, it saves, but no obs are created
10:26:02 <pascal`> dkayiwa, when it doesn't save (logged in as user A), it jumps back to the top as if a widget isn't bound, but all the widgets near the top seem to be bound
10:26:58 <dkayiwa> meaning that non admin role does not save obs for any form?
10:28:06 <pascal`> dkayiwa, no, just for this one form
10:28:15 <dkayiwa> ok
10:28:18 <pascal`> dkayiwa, it looks like some client side validation is failing and it's taking me to the first question
10:28:45 <dkayiwa> most probably un filled provider or location
10:29:02 <pascal`> dkayiwa, ok
10:29:28 <pascal`> dkayiwa, I'll make those fields visible so i can check
10:29:32 <dkayiwa> ok
10:30:44 *** goutham has quit IRC
10:31:48 <pascal`> dkayiwa, they're populated for the super user, checking the other user now
10:31:55 <dkayiwa> ok
10:32:37 <pascal`> dkayiwa, yeah, provider id isn't populated
10:32:42 <pascal`> danielf`, you see this?
10:32:57 <pascal`> danielf`, the provider field (which is hidden) isn't populated for out sports admin user.
10:33:38 <dkayiwa> has this user got a provider role?
10:33:50 <pascal`> dkayiwa, I don't think so
10:33:55 <dkayiwa> ok
10:33:59 <pascal`> there's only one provider in the drop down - the super user
10:34:05 <dkayiwa> ok
10:36:19 <danielf`> pascal`, will look noq
10:36:21 <danielf`> *now
10:36:36 <pascal`> dkayiwa, isn't there a global property to set the default provider?
10:36:50 <pascal`> yeah, xforms.setDefaultProvider
10:37:29 <pascal`> oh, but they have to have the provider role... hmmm.
10:37:36 <dkayiwa> yes
10:38:44 <pascal`> yeah, it works if they have the provider role. :)
10:38:52 <dkayiwa> ok
10:38:58 <pascal`> danielf`, we've got to give users the provider role during registration.
10:39:33 <danielf`> pascal`, this is weird though, this is the only form that appears to have this problem
10:39:59 <pascal`> danielf`, yeah, def something weird with this form
10:48:38 *** rafa has joined #openmrs
10:48:38 *** ChanServ sets mode: +v rafa
11:00:08 <pascal`> dkayiwa, running out of ideas here =S
11:00:35 <pascal`> dkayiwa, can you think of any way I can validation the message which xforms is passing to core?
11:00:52 <dkayiwa> ummm
11:01:21 <dkayiwa> are you able to debug into this method
11:01:22 <dkayiwa> processORU_R01
11:01:35 <dkayiwa> class ORUR01Handler
11:05:53 <pascal`> dkayiwa, yeah
11:06:03 <pascal`> dkayiwa, I can debug anything, just not sure what I'm looking for
11:06:21 <dkayiwa> can you put a break point on that line which logs the error message?
11:06:32 <dkayiwa> such that we get the concept on which it happens
11:07:19 <pascal`> dkayiwa, like I said above, it's null
11:08:38 <pascal`> dkayiwa, oh wait, different method
11:08:45 <dkayiwa> ok
11:08:57 <pascal`> the error is logged in the getConcept method
11:09:03 <dkayiwa> yes
11:09:03 <pascal`> and that's where the parameters are null
11:09:10 <dkayiwa> even uid?
11:10:08 <pascal`> let me check again now, but I don't think so
11:10:33 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (order-entry): Making the signAndActivateOrder method go through AOP - TRUNK-2385 <http://feedproxy.google.com/~r/OMRStrunk/~3/8xJSNLMeMoY/OpenMRS> || New Changeset: OpenMRS (providers): Fixed the redirect to happen to the same page on creating of a provider - TRUNK-2253 <http://feedproxy.google.com/~r/OMRStrunk/~3/KNTNcYoDlcY/OpenMRS>
11:11:04 <pascal`> dkayiwa, no, uid is fine
11:12:00 <dkayiwa> can you step out of that method (getConcept
11:12:08 <dkayiwa> and then look at other variables like
11:12:23 <pascal`> kk
11:13:11 <dkayiwa> and stepping out when those values are null
11:15:01 <pascal`> I'll check where it's trying to get the concept id and coding system from
11:15:08 <dkayiwa> yes
11:18:11 <pascal`> it's being called from: private Concept getConcept(CE codedElement, String uid)
11:18:28 <dkayiwa> ok
11:18:44 <pascal`> dkayiwa, and codedElement.data is [null, x 6]
11:18:52 <dkayiwa> ok
11:19:19 <dkayiwa> and from which method is that being called?
11:20:36 <pascal`> private Message processORU_R01(ORU_R01 oru) throws HL7Exception
11:20:52 <pascal`> dkayiwa, line 242
11:20:55 <pascal`> under the comment:
11:20:56 <dkayiwa> ok
11:20:57 <pascal`> / if we're not ignoring this obs group, create an
11:20:58 <pascal`> // Obs grouper object that the underlying obs objects will use
11:22:27 <pascal`> I can look at obr and obrConcept
11:22:34 <dkayiwa> ok
11:23:12 <pascal`> well, obrConcept will be null, because of the error
11:23:23 <pascal`> (it's set to the return value of the getConcept method)
11:23:38 <dkayiwa> ok
11:24:51 <dkayiwa> so messageControlId is null
11:26:41 <pascal`> numObr = 1, which seems correct, because I just filled in one answer
11:26:49 <dkayiwa> ok
11:27:03 <pascal`> no, messageConrolId looks like it's set to a uuid
11:27:24 <dkayiwa> meaning its not null?
11:27:54 <pascal`> no, it's set to: hpPgbDwYsJDfRcZJ2WMl
11:28:00 <dkayiwa> ok
11:28:01 <pascal`> mean anything? ;)
11:28:09 <dkayiwa> not to me :)
11:28:48 <pascal`> hehe
11:28:55 <pascal`> so, it's seeing that there's one obs
11:29:02 <pascal`> then, it's trying to get the concept but it cant
11:29:10 <pascal`> gotta figure out why
11:31:16 <dkayiwa> are you able to reproduce that error on a form that has just a few concepts?
11:31:40 <pascal`> dkayiwa, we haven't been able to yet, no
11:31:45 <dkayiwa> ok
11:32:04 <pascal`> been trying to figure out why getConcept is returning null
11:32:23 <dkayiwa> for the offending form, do any of the other concepts get saved on submit?
11:32:34 <dkayiwa> or none of the concepts on the form gets saved?
11:33:10 <pascal`> dkayiwa, none of the concepts get saved
11:33:15 <dkayiwa> ok
11:33:19 <pascal`> dkayiwa, no matter who saves the form. ever.
11:33:25 <pascal`> dkayiwa, but on an edit, everything is fine.
11:33:39 <dkayiwa> yes that makes sense because edit does not go through hl7
11:33:43 <pascal`> yeah
11:33:55 <dkayiwa> so even concepts that used to save do not save any more?
11:34:12 <dkayiwa> looks like there is one offending field we need to narrow down to
11:34:23 <pascal`> well, other forms which are 99% similar are working fine
11:34:34 <pascal`> dkayiwa, yeah, exactly, that's what I'm trying to figure out how to do
11:34:46 <pascal`> dkayiwa, I'm sure it's just one messed up field somewhere... but how do we figure that out?
11:34:53 <pascal`> dkayiwa, I can debug xforms too btw
11:34:57 <pascal`> the module I mean
11:35:04 <dkayiwa> ya
11:35:16 *** upul` has quit IRC
11:36:54 <dkayiwa> who last added fields to the form?
11:37:04 <dkayiwa> and which field did they last add?
11:38:02 <pascal`> they added those muslce soreness ones, which is why I initially thought they were the problem
11:38:09 <dkayiwa> ok
11:38:12 <pascal`> dkayiwa, but even when we remove those, the problem still exists
11:38:30 <pascal`> dkayiwa, I'm gonna delete the second half of the form and see if the problem is still there =D
11:38:51 <dkayiwa> ok. sorry for that pain.
11:39:06 <pascal`> dkayiwa, it's okay, lets get this sorted... I hope it's not a bug in xforms
11:39:19 <pascal`> dkayiwa, but if we find something, I sure it'll be useful to everyone to have it sorted
11:39:27 <dkayiwa> sure
11:39:31 <dkayiwa> thanks. :)
11:39:53 <pascal`> dkayiwa, deleting stuff form the design surface should be enough right?
11:40:08 <pascal`> dkayiwa, if the concepts are still in the schema it shouldn't matter, right?
11:40:23 <pascal`> (i.e. if the form fields still exist)
11:40:27 <dkayiwa> you may need to clear the schema
11:40:40 <pascal`> well, that's a lot tricker then
11:40:58 <dkayiwa> what does obr.toString() output?
11:41:04 <pascal`> there should be a button: delete form fields not on design ;)
11:41:18 <dkayiwa> sure
11:41:26 <pascal`> dkayiwa, I'll try and figure that out
11:41:29 <dkayiwa> ok
11:42:09 <pascal`> dont want to have to build and redeploy core =S
11:42:40 <dkayiwa> yes
11:44:53 <pascal`> dkayiwa, I don't have the source for OBR anyway
11:45:04 <dkayiwa> ok
11:45:11 <pascal`> dkayiwa, is there something particular field you're looking for... and I inspect the object.
11:45:20 <dkayiwa> not yet
11:46:37 <dkayiwa> let me have lunch and will come back with new idea. :)
11:50:25 <pascal`> dkayiwa, kk
12:32:54 *** wyclif has quit IRC
12:33:37 <pascal`> dkayiwa, lmk when you're back
12:33:43 <pascal`> dkayiwa, I think I've found something
12:34:02 <dkayiwa> aha
12:35:38 *** gbastien has joined #openmrs
12:36:10 <pascal`> dkayiwa, gonna send you two forms now
12:36:58 <dkayiwa> ok
12:38:42 <pascal`> dkayiwa, all i did was play around with the actual OBS node
12:38:53 <dkayiwa> ok
12:39:01 <pascal`> dkayiwa, I didn't even change anything I dont think... just edited, then selected "edit for this form only"
12:39:26 <pascal`> dkayiwa, then played around a bit but set the values to the same as they were before, and now it seemed to fix things up
12:39:42 <pascal`> ... after many iterations of slowly deleting things from the schema =\
12:39:43 <dkayiwa> ohhhhhhh
12:39:49 <pascal`> O_0
12:40:59 <pascal`> dkayiwa, it looks like an important diff element between those 2 xml's is: "_3._obs" vs "obs"
12:41:01 <pascal`> =S
12:41:16 <dkayiwa> ok
12:41:42 <pascal`> well, those forms only have 1 question on them each
12:41:53 <pascal`> so maybe you can take a look and see if you see anything dkayiwa?
12:41:58 <dkayiwa> ok
12:42:03 <pascal`> dkayiwa++
12:46:24 *** jportela has joined #openmrs
12:46:24 *** ChanServ sets mode: +v jportela
12:56:34 <pascal`> dkayiwa, how do I get the xform to recognize the new obs node name?
12:56:47 <pascal`> dkayiwa, without having to do a whole redesign obv :)
12:57:06 <dkayiwa> do you mean a name change to obs from _3_obs?
12:57:14 <pascal`> dkayiwa, I didn't a refresh (on the fields and on the design), but now everything is messed up.
12:57:40 <pascal`> dkayiwa, no, from _3._obs -> obs
12:58:49 <pascal`> dkayiwa, I guess you have to save the layout, do a total refresh on everything, then load the layout again?
12:59:00 <pascal`> dkayiwa, got a meeting, brb
12:59:06 <dkayiwa> ok
13:03:38 *** gbastien has quit IRC
13:05:58 *** dkayiwa has quit IRC
13:11:15 *** downeym has joined #openmrs
13:11:15 *** ChanServ sets mode: +o downeym
13:11:15 *** OpenMRSBot sets mode: +o downeym
13:13:08 *** gauravpaliwal has joined #openmrs
13:13:08 *** ChanServ sets mode: +v gauravpaliwal
13:19:33 *** wyclif has joined #openmrs
13:23:25 *** elliott_w has joined #openmrs
13:23:36 *** ChanServ sets mode: +o elliott_w
13:29:40 *** rafa has quit IRC
13:41:03 <downeym> !devmtg
13:41:03 <OpenMRSBot> downeym: "devmtg" --- Reminder: Developer meeting Thursday at 10:00 AM Eastern - http://wiki.openmrs.org/display/docs/Weekly+Developer+Meeting
13:41:07 <downeym> (in 20 min)
13:42:35 *** elliott_w has quit IRC
13:42:50 *** mandric has joined #openmrs
13:46:18 *** elliott_w has joined #openmrs
13:46:18 *** ChanServ sets mode: +o elliott_w
14:02:56 *** rafa has joined #openmrs
14:02:56 *** ChanServ sets mode: +v rafa
14:06:39 <surangak> downeym, i missed the first bit, but were u guys trying to have my presentation first ?
14:07:00 <surangak> downeym, could not heat the first part ...
14:13:50 <downeym> surangak: No, you are ok :)
14:14:07 <downeym> surangak: We skipped Jelena and Chris due to technical difficulties
14:14:12 <surangak> downeym, (thumbs up)
14:15:03 <gauravpaliwal> downeym: can we download the uploaded presentation on the connect ?
14:16:07 <downeym> gauravpaliwal: There's no way to download the original source file from connect, unfortunately
14:21:03 <downeym> jportela: ready? :)
14:21:14 <jportela> yes
14:21:17 <jportela> still have to test sound
14:21:27 <downeym> ok
14:21:30 <downeym> you are next :)
14:21:46 *** rahul_ has joined #openmrs
14:25:10 <downeym> next will be sai manohar with HR module
14:26:48 *** Gagaman has joined #openmrs
14:26:55 <downeym> Hi Gagaman and welcome to the #openmrs IRC channel.
14:30:43 *** pascal` has quit IRC
14:32:21 <surangak> downeym, hi, i need to upload my slides to connect.... I guess I need to wait till my turn comes up right ?
14:32:40 <downeym> surangak: yeah at this point you will need to wait, but it shouldn't take long.
14:33:04 <surangak> downeym, (thumbs up)
14:40:20 *** Gagaman has quit IRC
14:41:41 *** pascal` has joined #openmrs
14:43:35 *** ChanServ sets mode: +v pascal`
14:52:07 *** gbastien has joined #openmrs
14:56:19 *** rahul_ has quit IRC
15:02:19 *** szrrizvi has joined #openmrs
15:05:00 *** pascal` has quit IRC
15:05:00 *** gauravpaliwal has quit IRC
15:06:24 *** dkayiwa has joined #openmrs
15:45:46 *** downeym has quit IRC
15:46:03 *** downeym has joined #openmrs
15:46:03 *** ChanServ sets mode: +o downeym
15:46:03 *** OpenMRSBot sets mode: +o downeym
15:47:59 *** dlawson has joined #openmrs
15:47:59 *** ChanServ sets mode: +v dlawson
15:49:48 *** rafa has quit IRC
15:51:20 *** downeym has quit IRC
15:51:44 *** downeym has joined #openmrs
15:51:44 *** ChanServ sets mode: +o downeym
15:51:44 *** OpenMRSBot sets mode: +o downeym
15:55:48 *** mandric has quit IRC
16:00:52 *** danielf` has quit IRC
16:01:45 *** surangak has quit IRC
16:02:32 *** szrrizvi has quit IRC
16:06:22 *** dkayiwa has quit IRC
16:07:51 *** elliott_w has quit IRC
16:10:17 *** dkayiwa has joined #openmrs
16:17:30 *** szrrizvi has joined #openmrs
16:19:37 <szrrizvi> Hi. With the release of OpenMRS 1.8, are there much changes to the source code in the repository? I have a copy of the source code back from May.
16:23:50 *** szrrizvi has quit IRC
16:35:00 *** vlad___ has joined #openmrs
16:41:12 *** szrrizvi has joined #openmrs
16:42:11 *** jportela has quit IRC
16:48:58 *** rafa has joined #openmrs
16:48:58 *** ChanServ sets mode: +v rafa
16:54:00 *** rafa has quit IRC
17:13:51 *** muthah has quit IRC
17:24:02 *** jportela has joined #openmrs
17:24:02 *** ChanServ sets mode: +v jportela
17:25:09 *** vlad___ has quit IRC
17:43:25 *** szrrizvi has quit IRC
17:46:13 *** elliott_w has joined #openmrs
17:46:13 *** ChanServ sets mode: +o elliott_w
18:05:40 *** Suranga has joined #openmrs
18:10:39 *** bwolfe has joined #openmrs
18:10:39 *** ChanServ sets mode: +o bwolfe
18:13:34 <OpenMRSBot> Recent updates in the world of openmrs: On Twitter: OpenMRS: Fantastic work! RT @ScottMuc: Completed a bug fix for @OpenMRS in the code-jam! (Pairing w/Joel Tellez) http://bit.ly/iBhHZP <http://twitter.com/OpenMRS/statuses/83956308335804416> || On Twitter: OpenMRS: @jeffbrandt Thanks for the tweet! <http://twitter.com/OpenMRS/statuses/83955993536499712> || On Twitter: OpenMRS: RT @ScottMuc: Mob programming on @OpenMRS with #thoughtworks http://t.co/r8Natje <http://twitter.com/OpenMRS/statuses/83955837357408256>
18:36:39 *** bwolfe has quit IRC
18:36:43 *** bwolfe_ has joined #openmrs
18:36:43 *** ChanServ sets mode: +o bwolfe_
18:37:24 *** dlawson has quit IRC
19:00:24 *** vlad____ has joined #openmrs
19:17:58 <vlad____> hi, does anyone have suggestions or requests or ideas for https://tickets.openmrs.org/browse/TRUNK-2328
19:19:06 <vlad____> Not sure what the original idea was....but I'm up for a cool design project.
19:24:13 *** Suranga has quit IRC
19:24:24 <bwolfe_> vlad____, its either categorizing differently, laying it out differently, or using javascript to make it flow better
19:34:33 *** bwolfe_ has quit IRC
19:51:21 *** jportela has quit IRC
19:58:25 *** burke has joined #openmrs
19:58:25 *** ChanServ sets mode: +o burke
20:24:02 <burke> djazayeri: I'm working on answers right now.
20:25:16 <burke> downeym: over here!
20:32:31 *** cta has joined #openmrs
20:35:09 <downeym> burke: oh hi :)
20:35:09 <burke> woohoo! the water's warm over here! I think a kid just peed in the pool. :)
20:35:44 *** ChanServ changes topic to "OpenMRS: open source medical record systems for the developing world - http://openmrs.org/ - IRC info & logs: http://go.openmrs.org/irc"
20:36:12 <elliott_w> burke: i think peeing in the chatroom is a bannable offense here
20:37:14 <burke> it's sterile. :)
20:37:43 <burke> pooping is bannable.
20:38:07 * burke having a CaddyShack flashback
20:38:22 * burke wondering if Elliott has ever seen CaddyShack
20:41:44 *** rafa has joined #openmrs
20:41:44 *** ChanServ sets mode: +v rafa
20:42:56 *** cta has quit IRC
20:43:33 *** cta has joined #openmrs
20:55:51 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (order-entry): Making the patient regimen portlet able to save without a drug brand name - TRUNK-2385 <http://feedproxy.google.com/~r/OMRStrunk/~3/aOIAnC6zOE4/OpenMRS>
20:56:48 *** dkayiwa has quit IRC
20:58:25 *** elliott_w has quit IRC
21:02:57 *** cta_ has joined #openmrs
21:03:33 *** cta_ has joined #openmrs
21:04:09 *** cta has quit IRC
21:14:35 *** wyclif has quit IRC
21:14:45 *** wyclif has joined #openmrs
21:15:13 *** cta_ has quit IRC
21:15:40 *** cta has joined #openmrs
21:18:05 <cta> djazayeri: Darius, can you tell me if orders.oder_group_id should be mandatory or can allows null values?
21:18:18 <djazayeri> cta: should allow null
21:18:21 <djazayeri> not every order is in a group
21:18:28 <cta> djazayeri: thanx
21:18:35 <djazayeri> burke: we're not planning to allow nested order groups are we?
21:18:41 <djazayeri> (we do allow nested obs groups)
21:19:02 <burke> hehe. you want me to say no, don't you?
21:19:11 <djazayeri> definitely want you to say no
21:19:48 <burke> how about – unlike the obs mess that was created by embedding obs groups into obs – we had order_group.parent_order_group_id?
21:20:58 *** gbastien has quit IRC
21:21:23 <djazayeri> burke: sounds like that would work
21:21:29 <djazayeri> and we could also defer adding that until later
21:21:35 <burke> yup
21:23:33 *** mnunez has joined #openmrs
21:23:46 <downeym> Hi mnunez and welcome to the #openmrs IRC channel.
21:29:55 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (order-entry): Adding more javadoc to the Order class - TRUNK-2385 <http://feedproxy.google.com/~r/OMRStrunk/~3/3AsXbCbmJ1s/OpenMRS>
21:35:10 <mnunez> Hi! Just dropping by to say hello and introduce myself, I'm working on an epilepsy Disease Registry for the Hospital Ramos Mejía, Buenos Aires. Currently I'm trying to setup Eclipse for developing, and reading all the extensive documentation available! Nice work people!
21:35:46 <wyclif> djazayeri, i remember someone asking this question, can a module add modify a hibernate mapping e.g add a subclass to a hibernate mapping that has joined subclasses
21:36:02 <djazayeri> wyclif: I don't know
21:36:20 <djazayeri> mnunez: hola and good luck
21:37:12 <wyclif> djazayeri, but it is possible
21:37:22 <djazayeri> wyclif: I don't know if it's possible
21:38:16 <robbyoconnor> greetings and salutations
21:38:30 <djazayeri> wyclif: we do not need to keep the order_type table for modules to be able to add order types
21:38:51 <wyclif> that is what Burke is suggesting
21:39:17 <burke> burke: am not
21:39:18 <djazayeri> modules can add order types by providing a class on a classpath, or adding them to a map, or something
21:39:26 *** rafa has quit IRC
21:39:27 <djazayeri> but we don't need, and shouldn't have, a table for this
21:39:35 * burke apparently talking to himself
21:40:06 <djazayeri> burke: btw, I also said we should drop the orders.order_type column
21:40:09 <burke> the only purpose of a table would be to persist registered order types.
21:40:25 <burke> huh? what's the discriminator then?
21:40:27 <wyclif> i have dropped it
21:40:35 <wyclif> the order_id
21:40:48 <djazayeri> turns out that hibernate doesn't use a discriminator for joined-subclass (which is what we're using)
21:40:48 <burke> what? order_id isn't a discriminator. it's a primary key.
21:41:04 <djazayeri> order_id is listed as the discriminator because of some horrible ugly hack that ben figured out
21:41:08 <wyclif> hibernate is smart enough ot reslove the type by using the actual table where it found a row
21:41:13 <djazayeri> that somehow allows modules to extend tables
21:41:24 <burke> how does it distinguish orders vs. order_drug vs. order_test? it has to join all three tables?
21:41:54 <djazayeri> I assume, though I haven't thoroughly investigated that if you say "from DrugOrder" it will join on drug_order
21:41:54 <burke> sounds like we're heading back down the exception hell that we had with concept numerics long ago.
21:42:01 <djazayeri> if you say "from TestOrder" it will join on test_order
21:42:15 <djazayeri> if you say "from Order" it will just fetch base orders from the order table
21:42:17 <burke> what if you don't know drug vs. test?
21:42:34 <burke> e.g., if you ask for order #1234 you should get a DrugOrder back.
21:42:59 <djazayeri> I don't know if Hibernate can do that, actually
21:43:00 <wyclif> if you say give me an instance of type order it will join onto tables matching the subclasses, so depending on the table where it finds the row, then it will use that mapped subclass type
21:43:16 <burke> select from orders where order_id = 123 can return a DrugOrder or TestOrder, right?
21:43:26 <wyclif> yes
21:43:33 <djazayeri> burke: I'm looking at the documentation now, but I don't think it can.
21:43:49 <wyclif> so the table where it finds 123, it wil use the mapped classs for that joined table
21:43:55 <burke> how could it possible know that 123 is in drug_order or test_order?
21:44:32 <burke> Discriminator: http://bit.ly/jjF8dd
21:44:48 <djazayeri> actually, it looks like _can_ mix table-per-subclass and a discriminator
21:44:53 <burke> "The <discriminator> element is required for polymorphic persistence using the table-per-class-hierarchy mapping strategy."
21:45:05 <djazayeri> burke: we're not doing table-per-class-hierarchy
21:45:22 <djazayeri> that would be a single table with the union of all columns needed for DrugOrder, TestOrder, etc
21:45:32 <djazayeri> see 9.1.3 here though: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/inheritance.html
21:45:36 <OpenMRSBot> <http://ln-s.net/8wKl> (at docs.jboss.org)
21:45:41 <wyclif> it know the actual table where it found the row matching 123, them it will look in the mapping file and see that on order there a joined subclass say DrugOrder which is mapped to this table that it joined to and use that class defines in tag
21:46:06 <djazayeri> wyclif: if that's how it works, then it has to select on all possible joined subclass tables, to figure out which type it is
21:46:11 <wyclif> sorry about the typo
21:46:42 <burke> ok. table per subclass?
21:46:55 <djazayeri> that's what we're doing now.
21:47:06 <wyclif> yeah
21:47:06 <djazayeri> we're doing the thing in 9.1.2 now
21:47:53 <djazayeri> burke: the comment below the code snippet in 9.1.3 implies that the standard behavior is that when you get an Order it outer joins against all subclass tables
21:48:32 <wyclif> there are two ways to map subclasses, table per subclass and table per class hierachy
21:49:55 <burke> my brain can get around the table per subclass using a discriminator.
21:50:01 <wyclif> and for table per subclasses used the unique primary key as the discrimination value by figuring using the subclass type mapped to the joined table it found the row
21:50:01 <burke> gavin is *way* smarter than me.
21:50:06 <djazayeri> can = can or can = can't?
21:50:55 <wyclif> i need to stop typing
21:51:03 <burke> so it does an outer join to order_drug & order_test every time you fetch an order and then returns OrderDrug or OrderTest if there's a match?
21:51:04 <wyclif> am only mistyping
21:51:10 <djazayeri> wyclif: just paste a link to the docs. that's what I did. :-)
21:51:16 <wyclif> ok
21:51:19 <burke> that seems way less efficient than a discriminator.
21:51:51 <djazayeri> burke: I agree, but the implication from that one-liner after the code snippet is that even _with_ a discriminator it does the outer join
21:52:27 <burke> unless fetch="select"
21:52:55 <djazayeri> ah yes, so if you say fetch="select" then it won't do an outer join
21:53:06 <djazayeri> instead based on the discriminator it will do a second select
21:53:26 <djazayeri> on just one table
21:54:17 <wyclif> it is section 9.1.2 that we are using table per subclass
21:54:39 <djazayeri> wyclif: we're speculating about whether we should switch to 9.1.3
21:54:52 <wyclif> that is fine too
21:55:13 *** bryq has quit IRC
21:55:24 <burke> ugh. first I see regenstrief using long for all IDs. now hibernate. it's only a matter of time before we need to "go long".
21:57:08 <djazayeri> burke: can you make any sense of the table in 9.2?
21:57:16 <djazayeri> is that supposed to be giving us any useful info at all?
21:57:35 <wyclif> the issue with 9.1.3 is that we have to figure out if actually hibernate won't complain that our classes extending OrderType are not mapped since the are not primitive types
21:57:57 <djazayeri> wyclif: I think we'd just use a String for OrderType
21:57:59 <wyclif> or Wrapper classes for primitive types
21:58:06 <burke> when they say that "the [non-discriminator] approach taken by Hibernate is much more difficult to implement, but arguably more correct from a relational point of view," I wonder if it also means "wicked fast" or "more correct by 100x slower."
21:58:28 <djazayeri> I'm getting nothing when I google for hibernate polymorphism performance
21:58:34 <wyclif> +1 for order type to be a string
21:58:42 <burke> "more correct from a relational point of view" sounds like a catch phrase for "justifiably slower."
21:58:51 <wyclif> the API can enforce what can be used and what cannot
21:59:23 <djazayeri> wyclif: the other advantage of String is that if you remove a module that provides an order type things may not break as badly
21:59:24 <wyclif> and module developers only need to add to the list in their activators
21:59:39 <djazayeri> wyclif: have you looked into whether you can add another joined-subclass outside the xml descriptor?
21:59:53 <wyclif> that is what i was trying to find out
22:00:03 <djazayeri> because I worry that you can't, and that would basically mean that modules can't add order types.
22:00:24 *** downeym has quit IRC
22:00:37 <djazayeri> Actually, I bet they can.
22:00:44 <djazayeri> "implicity polymorphism"
22:00:53 <djazayeri> see also "Mixing implicit polymorphism with other inheritance mappings"
22:01:07 <wyclif> i have to look at the module's egined to see what elements to reads in
22:01:21 <wyclif> or we have to add a new tag to config.xml
22:01:46 <djazayeri> see here: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-polymorphism
22:01:51 <OpenMRSBot> <http://ln-s.net/8wL1> (at docs.jboss.org)
22:02:03 <burke> something interesting here: http://ibm.co/jonwLH
22:02:42 <djazayeri> one thing we should also look at is whether there are better ways to declare this with annotated classes.
22:03:19 <burke> Good Stack Overflow hit here: http://bit.ly/iL9ICb
22:03:53 <djazayeri> btw, burke we should consider making Order either abstract, or an interface
22:04:01 *** downeym has joined #openmrs
22:04:01 *** OpenMRSBot sets mode: +o downeym
22:04:01 *** ChanServ sets mode: +o downeym
22:04:22 *** downeym has quit IRC
22:04:37 <burke> interface would be most extensible. abstract probably easier in the short term.
22:04:41 <burke> yes.
22:06:16 <djazayeri> or else we say interface Order and we have abstract class BaseOrder
22:06:51 <djazayeri> (Thinking about what we'd need to do to enable modules to add their own Order subclasses, since they can't modify the Order.hbm.xml file.)
22:07:57 <djazayeri> see 9.1.7 in the docs I sent earlier
22:08:04 <djazayeri> burke & wyclif: ^^
22:08:38 <wyclif> hi
22:08:53 <wyclif> ok
22:09:10 <djazayeri> seems like we could allow modules to provide their own order subclasses if they do an entire table for it, and use "Implicit Polymorphism"
22:09:29 <robbyoconnor> hai burke!!!
22:09:42 <burke> h0wdy r0bby!
22:09:43 <djazayeri> not sure what happens if you try to do session.get(Order.class, orderId)
22:09:52 <robbyoconnor> been ages :)
22:10:03 <burke> yes. I remember when you were *this* tall!
22:10:18 <robbyoconnor> LOLL
22:10:33 <robbyoconnor> both my GSoC projects were picked up by others :X
22:10:50 <wyclif> djazayeri, you will get all subclasses of order that match that id across all tables
22:10:53 <robbyoconnor> so I'm contemplating jumping back onto the groovy module :)
22:11:04 <wyclif> i think that is what that page says
22:11:20 <djazayeri> yeah, that's not great
22:11:28 <wyclif> i.e for all persistent subclasses of order
22:12:24 <wyclif> read the note below the code snippet for 9.1.7
22:13:19 <wyclif> so you would have to pass the concrete class to refine results
22:13:35 <burke> robbyoconnor: thinking about a script plugin that uses JSR-223 to do Groovy, Python, Scala, JavaScript, Velocity, ... :)
22:14:12 <djazayeri> burke: how important is it that we (ever) support allowing modules to define new Order subclasses?
22:15:07 <djazayeri> if we ever want to support it, we really do need to proof-of-concept it now.
22:15:21 <burke> hmm. it would be nice.
22:15:41 <robbyoconnor> burke: I saw that
22:15:46 <burke> how about subclass + discriminator.
22:15:58 <robbyoconnor> I'll back off and let this convo progress
22:16:07 <djazayeri> burke: I like the idea of that.
22:16:18 <djazayeri> in principle it seems like having a discriminator in the root table is a good thing
22:16:32 <burke> especially for my simple-minded brain.
22:16:42 <robbyoconnor> Java Persistence with Hibernate is an invaluable resource to have on hand in dead tree form
22:16:55 <robbyoconnor> (I can't tell you how many times it bailed me out in 2009
22:17:01 <djazayeri> burke: but that will probably break the ability for modules to define subclasses
22:17:26 <burke> it would also be nice to have every order implementing getOrderType() to return it's type
22:19:04 <burke> and each OrderType relying on OrderType code to implement orderType.isOfType(type).
22:19:55 <burke> is it possible to have multiple discriminator values go to the same (sub)table?
22:20:28 <wyclif> hmm
22:20:58 <djazayeri> burke: what's the point of Order.getOrderType()?
22:21:07 <djazayeri> isn't that just Order.getClass() ?
22:21:47 <burke> maybe. i want to have the option to classify orders into radiology, microbiology, hematology, ... that are all different TEST types.
22:21:55 <burke> they can all use TestOrder.
22:22:50 <djazayeri> Okay, but I think that radiology vs microbiology vs hematology is orthogonal to the polymorphic class
22:23:07 <djazayeri> i.e. they're all TestOrders
22:23:10 <burke> and then bury the knowledge that radiology/microbiology/hematology/etc are all TEST types within OrderType
22:23:36 <burke> yes. that's why getClass() is insufficient.
22:23:45 <cta> djazayeri: I already added all necessary domain object and service methods for OrderGroups class. Also I tested that and tests were "green". So, I'm about to commit code. May be you have any questions before I do that?
22:23:58 <djazayeri> what I mean is that "orderType" as you're talking about it here is just another property
22:24:02 <burke> it's closer to getConcept().getConceptClass().
22:24:10 <djazayeri> i.e. it's like an EncounterType
22:24:26 <djazayeri> it's perfectly fine for Order (or TestOrder) to define an orderType property
22:24:37 <djazayeri> just like Encounter has encounterType
22:25:07 <djazayeri> cta: nothing springs to mind
22:25:23 <djazayeri> go ahead and commit
22:25:32 <cta> ok
22:26:22 <djazayeri> burke: so at the hibernate level I could say "from TestOrder where orderType = :radiologyOrderType"
22:26:29 <burke> Yes, but I'm wanting Order.orderType to be DRUG, REFERRAL, HEMATOLOGY_TEST, MICROBIOLOGY_TEST, etc. as well as a discriminator between basic order vs. DrugOrder vs. TestOrder.
22:26:48 <djazayeri> burke: I know that's what you're wanting, I just think it's a bad idea. :-)
22:27:05 *** gbastien has joined #openmrs
22:27:18 <burke> me too, unfortunately.
22:27:36 <wyclif> why dont we use strings?
22:28:11 <djazayeri> burke: we'd do better with an order_type (discriminator) and a sub_type (hematology/radiology/microbiology)
22:28:27 <burke> if order type is limited to being a discriminator (e.g., TEST vs. DRUG vs. ORDER), then how do I distinguish radiology test from hematology test from referral? getConcept().getConceptClass()?
22:28:43 <djazayeri> burke: once you have one? or when you're selecting?
22:29:00 <burke> Both. I want everything.
22:29:14 <burke> I'm an end-user now. Make the little box dance for us. :)
22:29:41 <djazayeri> okay, if I have an Order o, I can say o.getSubType()
22:30:09 <djazayeri> and if I want all the radiology test orders, it's "from TestOrder where subType = :radiology"
22:30:10 <burke> what's the difference b/w o.getSubType() and o.getConcept().getConceptClass()?
22:30:45 <djazayeri> you tell me
22:31:08 <djazayeri> personally I hate ConceptClass because we've never implemented it to do anything useful.
22:31:09 <burke> as paul suggested, I think we need to work thru (clean up) our concept classes.
22:31:22 <djazayeri> sure
22:31:45 <djazayeri> My completely uninformed opinion is that in this case o.getConcept().getConcepClass() would be "Test"
22:31:57 <djazayeri> but o.getSubType() would be "Radiology Test"
22:32:15 <djazayeri> o.getType() should give you TestOrder.class
22:32:21 <djazayeri> (not sure if that's possible)
22:33:12 <burke> I think this is where Concept Class get's a little more useful/interesting (aka hideous).
22:33:24 <burke> b/c concept class could be "Hematology Test"
22:33:26 *** mnunez has quit IRC
22:33:33 <djazayeri> could be, yes
22:33:46 <djazayeri> that gets rid of the need for subtype
22:33:58 <djazayeri> but means that we need to allow modules to create concept classes
22:34:10 <burke> The trick is having somewhere where we manage the knowledge of the (potentially messy) hierarchy of these things.
22:34:26 <djazayeri> Why do we need to manage that hierarchy?
22:34:35 <djazayeri> what's the use case?
22:34:36 <burke> Show me all tests.
22:34:46 <djazayeri> "from TestOrder"
22:34:58 <djazayeri> oh, you mean the concepts
22:35:01 <burke> Sorry. Show me all of the tests I can order.
22:35:26 <djazayeri> okay, you win
22:35:34 <burke> I start to shake when the word "ontology" enters my frontal lobes.
22:35:47 <djazayeri> OrderService.getOrderables(TestOrder.class)
22:35:55 <djazayeri> that does need to know all the types of test orders
22:36:14 <djazayeri> I can imagine quite a few straightforward, easy, hacky solutions
22:36:15 <djazayeri> :-)
22:37:07 <burke> it would be most powerful to let the concept dictionary admin deal with this – i.e., distinguish which things are tests vs. drugs vs. other and categorize them into the clinical relevant "Radiology Tests", "Hematology Tests", "Microbiology Tests", etc.
22:37:36 <djazayeri> Honestly I'd prefer for the distinction between different classes of tests to be done with labels or tags or something
22:37:50 <djazayeri> i.e. there's just a "Test" ConceptClass
22:38:16 <djazayeri> hematocrit has class=Test, and is tagged with "hematology"
22:38:32 <djazayeri> or maybe belongs to the set "hematology tests"
22:38:34 <burke> But I can guarantee you that we'll end up needing to answer "get me all of the hematology tests"
22:38:58 <djazayeri> So, explain to me why that isn't just a concept set
22:39:31 <burke> sets become less useful / harder to manage when they have hundreds of members.
22:39:43 <djazayeri> only if we have bad tools...
22:39:44 <burke> and, in general, we code against classes
22:39:52 <burke> we have bad tools, then.
22:39:53 <burke> :p
22:40:01 <djazayeri> okay, but where will we be coding against "hematology tests"?
22:40:05 <djazayeri> Not in core, I hope
22:41:02 <djazayeri> I just googled JPA polymorphism, and here's some relevant commentary
22:41:02 <djazayeri> http://openjpa.apache.org/builds/1.0.2/apache-openjpa-1.0.2/docs/manual/jpa_overview_mapping_inher.html#jpa_overview_mapping_inher_joined_adv
22:41:07 <OpenMRSBot> <http://ln-s.net/8wLS> (at openjpa.apache.org)
22:41:29 <djazayeri> the joined strategy is often the slowest of the inheritance models. Retrieving any subclass requires one or more database joins, and storing subclasses requires multiple INSERT or UPDATE statements
22:41:38 <burke> Maybe the answer is to separate the TEST from the "service" that performs the test. (looking at HL7)
22:42:00 <djazayeri> Didn't Saptarshi ask something about that recently?
22:42:07 <djazayeri> I guess that was about the target of the order.
22:42:11 <djazayeri> which was a service
22:42:20 <burke> yeah.
22:42:42 <burke> the problem is that a radiology test will likely need a different input form from a microbiology test.
22:42:54 <burke> well... at least different fields / behaviors.
22:43:08 <djazayeri> is that UI going to be part of core?
22:43:17 <burke> for example, laterality is required for many radiology tests. clinical history is required for all of them.
22:43:31 <wyclif> so what is the resolution for order_types
22:43:37 <wyclif> i would vote strings
22:43:40 <burke> but not true for microbiology tests, that often need to know site or source (where the specimen was drawn from)
22:43:58 <djazayeri> but burke, not _all_ radiology tests need laterality
22:44:04 <djazayeri> (many do...)
22:44:14 <wyclif> letting modules register subclasses would require revisiting the module engine's logic
22:44:17 <djazayeri> so, let's address wyclif's question
22:44:18 <burke> the API's ability to inform the UI (e.g., here are the properties that are required for this order) should be part of core.
22:44:26 <wyclif> and defining new elements in the config file
22:45:00 <djazayeri> the key question is whether or not we want to allow modules to define their own subclasses of Order
22:45:24 <djazayeri> if we do eventually want to support that, then the blocker issue is "figure out how to support modules defining their own subclasses of Order"
22:45:29 <burke> so, let's do subclass+discriminator for now. use a string (not int) for discriminator. and support DRUG & TEST. We probably need one for a basic (not drug or test)... REFERRAL?
22:46:03 <djazayeri> I'd expect that REFERRAL is going to get its own table when we implement it.
22:46:13 <burke> or, if it's a disriminator, is it DRUG, TEST, or ORDER as the only three options and then we use something else (concept class and/or Darius' subtype) to sort out the rest.
22:46:24 <burke> nope. referral is just an order.
22:46:40 <burke> that's working for us at regenstrief. concept + instructions is about all that you need.
22:47:05 <djazayeri> so, the implication there is that we shouldn't make Order abstract.
22:47:06 <burke> DENTAL REFERRAL : please take a look at this guy's teeth 'cause they are a mess!
22:47:30 <burke> there's the rub.
22:47:30 <djazayeri> I.e. there's no ReferralOrder java class
22:47:40 <burke> I want a ReferralOrder back when it's a referral.
22:47:44 <burke> not yet
22:48:14 <djazayeri> I wonder if <join> is required for <subclass>
22:48:18 <burke> ok. i've got to go in about -45 minutes.
22:48:20 <wyclif> ok i will go with subclass+discriminator
22:48:52 <wyclif> me to in ablut -48min
22:49:13 <wyclif> sorry, me too in about -48min
22:49:30 <djazayeri> wyclif: okay, go with subclass+discriminator
22:49:51 <djazayeri> and while you're doing that, can you try adding a ReferralOrder class that extends Order but adds no methods or properties
22:50:00 <burke> so, darius, I think there's a hint of hope (or pain) in that last moment... I want to get DrugOrder, TestOrder, DietOrder, or ReferralOrder back as the orders from the API, but only need orders, order_drug, and order_test tables.
22:50:01 <wyclif> djazayeri, if you use the subclass tag then you need a join tag and define the discriminator value
22:50:05 <djazayeri> and try adding that as a subclass too, with no <join> tag
22:50:07 <burke> Just solve that little puzzle & we're good.
22:50:34 <wyclif> i will
22:50:41 <djazayeri> burke: _why_ do you want to get back ReferralOrder as a strongly-typed class if it has no properties?
22:51:15 <djazayeri> no properties beyond what's in Order, I mean.
22:51:31 <burke> I guess it doesn't _have_ to be a ReferralOrder as long as I can easily tell it's a referral.
22:52:01 <burke> ... hate to do this... but I gotta run. Lorrie is gonna kill me. Still at the office.
22:52:07 <burke> I can see Wyclif right over there.
22:52:15 <djazayeri> that was less that 45 mins
22:52:29 <burke> By -45 minutes, I meant 45 minutes *ago*
22:52:51 <wyclif> i think it no pint to define a subclass that add nothing
22:52:53 <burke> I told Lorrie I was heading home nearly an hour ago.
22:52:54 <djazayeri> anyway, in that case you can say o.getConcept().getConceptClass().equals(referralConceptClass)
22:53:02 <djazayeri> ttyl burke
22:53:12 <burke> uh oh. wyclif said pint. time to hit the bar!
22:53:13 <djazayeri> wyclif: okay, don't bother with ReferralOrder then.
22:53:21 <wyclif> no point to define a subclass that adds nothing to the structure and behaviour
22:53:24 <burke> +1 for no ReferralOrder for now.
22:53:39 <wyclif> ok
22:54:09 <burke> For the most part, do the exact opposite of anything I say. Then, after I change course a few times, it's more likely we'll be 80% aligned in the end. :p
22:54:17 <wyclif> wil try to get this done as soon as i can so that i can proceed with the dependant ticket
22:54:26 <djazayeri> cta: btw, you saw the comment to do Set instead of List in OrderGroup, right?
22:54:42 <wyclif> no bars!!
22:54:57 <cta> djazayeri: yes, Darius, I did
22:55:13 <cta> I used set
22:55:23 <djazayeri> cool, i'll review the code then. :-)
22:55:39 <burke> robbyoconnor: I'm dying for a script engine that can manage scripts as independent processes, prevent them from crashing the server, let you view running scripts, interrupt them, view their output after leaving & coming back, etc.
22:55:51 <burke> ok. really gotta go now.
22:56:00 <cta> djazayeri: I'm creating review for that now
22:56:01 <burke> cya
22:56:06 *** burke has quit IRC
22:56:59 <wyclif> bye bye
22:59:23 <cta> djazayeri: Darius, I created nwe review for that. There is link https://source.openmrs.org/cru/CR-TRUNK-378
22:59:33 <djazayeri> thanks, i'll take a look in a sec
22:59:40 <cta> (nwe) -> new
22:59:44 <cta> ok))
23:00:07 <cta> I gotta sleep. See tomorrow. Bye.
23:01:18 *** cta has quit IRC
23:01:25 <djazayeri> bye cta, btw, you forgot to start the review
23:01:35 <djazayeri> …guess I'll do it. :-)
23:02:18 <OpenMRSBot> Recent updates in the world of openmrs: New Changeset: OpenMRS (order-entry): Added all necessary domain object and service methods for OrderGroups class - TRUNK-2378 <http://feedproxy.google.com/~r/OMRStrunk/~3/RNO9Xsoqim4/OpenMRS>
23:03:33 *** wyclif has quit IRC