gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Inadvertent deletion of Procedure when Deleting episo


From: Busser, Jim
Subject: Re: [Gnumed-devel] Inadvertent deletion of Procedure when Deleting episode
Date: Thu, 1 Aug 2013 17:56:18 +0000

Under Spock, I created a new Health issue "MVA" and then created a

        new Episode
        new Procedure (which created a new root item)

whose particulars I append.

I then deleted the episode from within the GNUmed client, and while it is -- as 
expected -- "gone" (moved into the audit table), this turns out to NOT have any 
effect on the clin.clin_root_item which

- still exists, and
- which now *does* have a dangling episode.

IOW we are (I am) stumped for how I can be "missing" any root items when the 
schema is supposed to not allow them to have been deleted … see next email

-- Jim

=============================
gnumed_v18=> select * from clin.episode where pk = (select max(pk) from 
clin.episode) ;
 pk_audit | row_version |         modified_when         | modified_by | pk  | 
fk_health_issue | description | is_open | fk_encounter | 
diagnostic_certainty_classification | summary 
----------+-------------+-------------------------------+-------------+-----+-----------------+-------------+---------+--------------+-------------------------------------+---------
  1662625 |           1 | 2013-08-01 09:09:17.647967-07 | jabu        | 398 |   
           95 | mva         | t       |         1156 |                          
           | 
(1 row)

gnumed_v18=> select pk_item, pk, clin_when, fk_encounter, fk_episode, 
narrative, clin_where FROM clin.procedure WHERE pk_item = (SELECT MAX(pk_item) 
FROM clin.clin_root_item) ;
 pk_item | pk |           clin_when           | fk_encounter | fk_episode |     
      narrative           |         clin_where         
---------+----+-------------------------------+--------------+------------+-------------------------------+----------------------------
    1071 |  5 | 2013-08-01 09:09:45.788782-07 |         1156 |        398 | 
fixation left tibial fracture | Enterprise Healthcare Unit
(1 row)

gnumed_v18=> select pk_item, pk, clin_when, fk_encounter, fk_episode, 
narrative, clin_where FROM clin.procedure WHERE pk_item = (SELECT MAX(pk_item) 
FROM clin.clin_root_item) ;
 pk_item | pk |           clin_when           | fk_encounter | fk_episode |     
      narrative           |         clin_where         
---------+----+-------------------------------+--------------+------------+-------------------------------+----------------------------
    1071 |  5 | 2013-08-01 09:09:45.788782-07 |         1156 |        398 | 
fixation left tibial fracture | Enterprise Healthcare Unit
(1 row)

gnumed_v18=> 
=============================
end


reply via email to

[Prev in Thread] Current Thread [Next in Thread]