there is no mismatch there.
the care_prescription_sub gets filled only for the inpatients. because 
only for
inpatients the med flow is equal for every hospital.

i described in a recent mail how the meds flow works in the current c2x.
( prescription -> dept pharmacy -> main pharmacy -> depot )
and if you see the sample roles i submitted, there are specific roles 
for that

gj.

On 2010-09-26 11:05.MD, Ap.Muthu wrote:
> Committed SVN 6801 now enabling forms for data entry for the admitted paient 
> to get tagged to prescriptions, notes, measurements, birth data and 
> immunisation particulars. The variables have been initialised in the 
> respective scripts instead of at the common 
> /modules/registration_admission/include/init_show.php file since there are 
> other files that use it without needing data entry access from here..
>
> The prescription form still does not save the data into the second table 
> care_encounter_prescription_sub. This could be due to delayed write in 
> obtaining the LastInserID for the parent table care_encounter_prescription or 
> due to mismatch in some foreign key field types / sizes or some NOT NULL 
> fields in not being populated. Requires testing.....
>
> Congrats Robert in getting the new installer up and for conversion of SQL 
> files to CSV - was the latter necessary?
>
> - Ap.Muthu
>
>
>    When entering the modules/registration_admission/include/gui_show.php 
> file, the contents of the $_SESSION variable are:
>
> Array
> (
>      [sess_user_name] =>  admin
>      [sess_user_origin] =>  registration
>      [sess_file_forward] =>
>      [sess_file_return] =>  show_prescription.php
>      [sess_file_break] =>  modules/news/start_page.php
>      [sess_path_referer] =>  
> modules/registration_admission/show_prescription.php
>      [sess_dept_nr] =>  1
>      [sess_title] =>  Headline::Submit News
>      [sess_lang] =>  en
>      [sess_user_id] =>  CFG4c9e13c9e622a0.94263600 1223456789.cfg
>      [sess_cur_page] =>
>      [sess_searchkey] =>  care_person WHERE name_last LIKE 'ong%' OR 
> name_first LIKE 'ong%' AND status NOT IN 
> ('deleted','hidden','inactive','void')
>      [sess_tos] =>  194648
>      [sess_news_nr] =>
>      [sess_file_editor] =>  headline-edit-select-art.php
>      [sess_file_reader] =>  headline-read.php
>      [sess_login_userid] =>  admin
>      [sess_login_username] =>  admin
>      [sess_login_pw] =>  base64 encoded and hashed pwd
>      [department_nr] =>
>      [sess_pid] =>  10000000
>      [sess_parent_mod] =>  registration
>      [sess_en] =>  0
>      [sess_full_pid] =>  10000000
>      [sess_full_en] =>  2010500000
> )
>
>
>      Further investigation shows that on line 63 of 
> modules/registration_admission/include/init_show.php
>      if($_SESSION['sess_parent_mod']=='admission') {
>      The value of the session variable is "registration" and not "admission" 
> in this case of prescription for an admitted patient.
>      Most of the contents of the if construct are needed to establish 
> $parent_admit=true and that $is_discharged = FALSE for the new prescription 
> entry to be visible.
>
>        Patient
>        ->  Admit Patient as Out patient
>        ->  Fix Appointment for patient
>        ->  Make Encounter for Appointment of Patient
>        Choose Prescriptions on right menu options.
>
>        It will proceed to 
> /modules/registration_admission/show_prescription.php
>        which includes the file 
> /modules/registration_admission/include/init_show.php (here the variable 
> $is_discharged is set "safely" to TRUE) and then proceeds to 
> /modules/registration_admission/gui_bridge/default/gui_show.php where if no 
> prescriptions were found, a link to enter a new one should be displayed vide 
> lines:
>            if($parent_admit&&  !$is_discharged&&  
> $thisfile!='show_diagnostics_result.php'){
>             $smarty->assign('sPromptIcon','<img 
> '.createComIcon($root_path,'bul_arrowgrnlrg.gif','0','absmiddle',TRUE).'>');
>             $smarty->assign('sPromptLink','<a 
> href="'.$thisfile.URL_APPEND.'&pid='.$_SESSION['sess_pid'].'&target='.$target.'&mode=new">'.$LDEnterNewRecord.'</a>');
>             }else{
>             
> if(file_exists('./gui_bridge/default/gui_person_createnew_'.$thisfile)) 
> include('./gui_bridge/default/gui_person_createnew_'.$thisfile);
>            }
>        The value of the variables for an admitted patient just before 
> entering this code set are:
>        $parent_admit = FALSE
>        $is_discharged = TRUE
>
>        From the above it is seen that the if statement above will always fail 
> and so the "Enter New Record" link never gets displayed!
>
>        The very same gui_show.php is also used successfully by the 
> Appointments options page and it get the variables correct at this point.
>
>        zThis error persists with
>
>
>        Regards,
>        Ap.Muthu
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
>
>
> _______________________________________________
> Care2002-developers mailing list
> Care2002-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/care2002-developers

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Care2002-developers mailing list
Care2002-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/care2002-developers

Reply via email to