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 18:57:10 +0000

On 2013-08-01, at 11:11 AM, Jim Busser <address@hidden> wrote:

> AND If rows in the clin.clin_root_item table are not supposed to be able to 
> be deleted (except this possibility is hinted at by the missing 1070), why 
> does my table
> 
>       gnumed_v18=> SELECT COUNT(pk_item)
>                                       FROM clin.clin_root_item ;
>        count
>        -------
>        1031
>        (1 row)
> 
> contain only 1031 rows? What happened to the other roughly 40 rows? 

Looking to find some impact (consequence) for one or more of the seemingly 
missing clin.clin_root_item rows for example having pk_item = 1040, I ran the 
following queries and cannot locate any clinical rows that would depend on such 
a root item.

Where else can I look for some evidence of whether at some point 
clin.clin_root_item with

        pk_item = 1040

existed?

Is there some reason why a sequence number (which I have never myself altered) 
would get skipped?

-- Jim

===============================================================

gnumed_v18=> select * from clin.allergy where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk | substance | 
substance_code | generics | allergene | atc_code | fk_type | generic_specific | 
definite 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----+-----------+----------------+----------+-----------+----------+---------+------------------+----------
(0 rows)

gnumed_v18=> select * from clin.clin_aux_note where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----
(0 rows)

gnumed_v18=> select * from clin.clin_narrative where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----
(0 rows)

gnumed_v18=> select * from clin.family_history where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk | fk_relation_type | 
age_noted | age_of_death | contributed_to_death | name_relative | dob_relative 
| comment 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----+------------------+-----------+--------------+----------------------+---------------+--------------+---------
(0 rows)

gnumed_v18=> select * from clin.form_instances where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk | fk_form_def | form_name 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----+-------------+-----------
(0 rows)

gnumed_v18=> select * from clin.hospital_stay where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk | discharge 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----+-----------
(0 rows)

gnumed_v18=> select * from clin.lab_request where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk | fk_test_org | 
request_id | fk_requestor | lab_request_id | lab_rxd_when | 
results_reported_when | request_status | is_pending | 
diagnostic_service_section | ordered_service | note_test_org 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----+-------------+------------+--------------+----------------+--------------+-----------------------+----------------+------------+----------------------------+-----------------+---------------
(0 rows)

gnumed_v18=> select * from clin.procedure where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk | clin_where | 
fk_hospital_stay | clin_end | is_ongoing 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----+------------+------------------+----------+------------
(0 rows)

gnumed_v18=> select * from clin.substance_intake where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk | fk_substance | 
preparation | schedule | aim | duration | intake_is_approved_of | is_long_term 
| discontinued | discontinue_reason | fk_drug_component 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----+--------------+-------------+----------+-----+----------+-----------------------+--------------+--------------+--------------------+-------------------
(0 rows)

gnumed_v18=> select * from clin.test_result where pk_item = 1040 ;
 pk_audit | row_version | modified_when | modified_by | pk_item | clin_when | 
fk_encounter | fk_episode | narrative | soap_cat | pk | fk_type | val_num | 
val_alpha | val_unit | val_normal_min | val_normal_max | val_normal_range | 
val_target_min | val_target_max | val_target_range | abnormality_indicator | 
norm_ref_group | note_test_org | material | material_detail | 
fk_intended_reviewer | fk_request 
----------+-------------+---------------+-------------+---------+-----------+--------------+------------+-----------+----------+----+---------+---------+-----------+----------+----------------+----------------+------------------+----------------+----------------+------------------+-----------------------+----------------+---------------+----------+-----------------+----------------------+------------
(0 rows)

gnumed_v18=> select * from clin.v_linked_codes where pk_item = 1040 ;
 pk_item | item_table | code | base_code | code_modifier | term | name_long | 
name_short | version | lang | code_table | pk_generic_code | pk_data_source | 
pk_lnk_code2item 
---------+------------+------+-----------+---------------+------+-----------+------------+---------+------+------------+-----------------+----------------+------------------
(0 rows)

gnumed_v18=> select * from clin.v_pat_allergies where pk_item = 1040 ;
 pk_allergy | pk_patient | soap_cat | descriptor | allergene | substance | 
substance_code | generics | generic_specific | atc_code | type | l10n_type | 
definite | reaction | pk_type | pk_item | date | pk_health_issue | pk_episode | 
pk_encounter | modified_when | modified_by | xmin_allergy 
------------+------------+----------+------------+-----------+-----------+----------------+----------+------------------+----------+------+-----------+----------+----------+---------+---------+------+-----------------+------------+--------------+---------------+-------------+--------------
(0 rows)

gnumed_v18=> select * from clin.v_pat_narrative where pk_item = 1040 ;
 pk_patient | date | provider | soap_cat | narrative | pk_item | pk_narrative | 
pk_health_issue | pk_episode | pk_encounter | xmin_clin_narrative | 
modified_when | row_version | pk_generic_codes 
------------+------+----------+----------+-----------+---------+--------------+-----------------+------------+--------------+---------------------+---------------+-------------+------------------
(0 rows)

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


reply via email to

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