taskGNU Health - Tasks: task #12878, Include the EKG model to core

 
 

You are not allowed to post comments on this tracker with your current authentification level.

task #12878: Include the EKG model to core

Submitted by:  Luis Falcon <meanmicio>
Submitted on:  Wed 02 Oct 2013 09:15:41 PM UTC  
 
Should Start On: Wed 02 Oct 2013 12:00:00 AM UTCShould be Finished on: Wed 01 Jul 2015 12:00:00 AM UTC
Category: FunctionalityPriority: 5 - Normal
Status: Ready For TestPrivacy: Public
Percent Complete: 100%Assigned to: Luis Falcon <meanmicio>
Open/Closed: OpenRelease: 2.9.0
Module: inpatient

(Jump to the original submission Jump to the original submission)

Wed 10 Jun 2015 06:55:03 AM UTC, comment #7:

You can find an example at http://hg.tryton.org/modules/account/file/ea4966101d86/move.py#l141

Cédric Krier <cedk>
Project Member
Tue 09 Jun 2015 11:48:53 PM UTC, comment #6:

@Cédric: Yeah, that restriction on SQLite is annoying. If it were a static value to update, then I think a subquery could work. It's not a static update value though, so I don't actually know how to do it cleanly. However, from what I gather, every Health user should be running postgresql (!). So... maybe that's ok. =-) I updated it with your table suggestion. Thanks!

@Luis: Please do! I know I must've missed and/or broken something. Hehe.

Chris Zimmerman <teffalump>
Project Member
Tue 09 Jun 2015 07:55:52 PM UTC, comment #5:

Wonderful, Chris !

Thanks a lot. I'll be testing during the week.

Best,

Luis Falcon <meanmicio>
Project AdministratorIn charge of this item.
Tue 09 Jun 2015 07:07:14 AM UTC, comment #4:

> a = Table('gnuhealth.patient.ecg')


is not correct. You should write:

> ECG = pool.get('gnuhealth.patient.ecg')
> a = ECG.__table__()


SQLite doesn't support the UPDATE/FROM so your query will fail on it.

PS: it will be easier if we were using a codereview tool.

Cédric Krier <cedk>
Project Member
Tue 09 Jun 2015 04:42:23 AM UTC, comment #3:

Thanks Cédric!

I just updated the code, using your suggestions.

Here it is:

http://hg.savannah.gnu.org/hgweb/health/rev/5975bdb2ad4b

I think I fixed the constraint naming in this commit (?!):

http://hg.savannah.gnu.org/hgweb/health/rev/df5a68e1a4db

Chris Zimmerman <teffalump>
Project Member
Mon 08 Jun 2015 06:17:09 AM UTC, comment #2:

You should not write raw SQL queries in _register_
To add column, you shoud use the TableHandler.add_raw_column.
For update query, you should write a python-sql query.
To drop constraint, you should use Table.Handler.drop_constraint.

Otherwise the code will not work independently of the database backend.

Cédric Krier <cedk>
Project Member
Sun 07 Jun 2015 11:07:16 PM UTC, comment #1:

I just commited a pretty hefty patch to move the ECG class to the core. I've tested it but I would definitely like some double-checking.

http://hg.savannah.gnu.org/hgweb/health/rev/87be956933f9

The re-design is basically this:

- Move the class to the core (including xml files, etc)
- The required field is the patient, not an inpatient registration
- The health_inpatient module adds the optional inpatient_registration field

Now, ecgs can be used outpatient. I haven't added anything fundamentally new, just migrated the existing functionality.

I would definitely appreciate some more testing, especially on upgrading. The __register__ function should migrate the inpatient registration codes, deduce and update the patient info, but I'm worried. Hehe.

Chris Zimmerman <teffalump>
Project Member
Wed 02 Oct 2013 09:15:41 PM UTC, original submission:

The electrocardiogram class in currently on the ICU module.

Although is the right place to be, EKGs are also taken in an outpatient basis and for checkups.

We should include the EKG in the core.

Luis Falcon <meanmicio>
Project AdministratorIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by cedk (Posted a comment)
  • -unavailable- added by teffalump (Posted a comment)
  • -unavailable- added by meanmicio (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 07 Jun 2015 11:07:16 PM UTCteffalumpShould be Finished onSun 24 Nov 2013 12:00:00 AM UTC=>Wed 01 Jul 2015 12:00:00 AM UTC
      StatusNone=>Ready For Test
      Percent Complete0%=>100%
      Release2.3.0=>2.9.0
    Thu 03 Oct 2013 01:49:00 AM UTCmeanmicioAssigned toNone=>meanmicio
    Wed 02 Oct 2013 09:18:05 PM UTCmeanmicioShould be Finished onWed 02 Oct 2013 12:00:00 AM UTC=>Sun 24 Nov 2013 12:00:00 AM UTC
      ReleaseNone=>2.3.0

    Back to the top


    Powered by Savane 3.1-cleanup