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 Oct 2 21:15:41 2013  
 
Should Start On: Wed Oct 2 00:00:00 2013Should be Finished on: Wed Jul 1 00:00:00 2015
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 Jun 10 06:55:03 2015, comment #7:

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

Cédric Krier <cedk>
Tue Jun 9 23:48:53 2015, 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 Jun 9 19:55:52 2015, 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 Jun 9 07:07:14 2015, 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>
Tue Jun 9 04:42:23 2015, 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 Jun 8 06:17:09 2015, 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>
Sun Jun 7 23:07:16 2015, 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 Oct 2 21:15:41 2013, 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 Jun 7 23:07:16 2015teffalumpShould be Finished onSun Nov 24 00:00:00 2013=>Wed Jul 1 00:00:00 2015
      StatusNone=>Ready For Test
      Percent Complete0%=>100%
      Release2.3.0=>2.9.0
    Thu Oct 3 01:49:00 2013meanmicioAssigned toNone=>meanmicio
    Wed Oct 2 21:18:05 2013meanmicioShould be Finished onWed Oct 2 00:00:00 2013=>Sun Nov 24 00:00:00 2013
      ReleaseNone=>2.3.0

    Back to the top


    Powered by Savane 3.1-cleanup