icd10 = models.ForeignKey(null = get_module('icd10) , blank = get_module('icd10')
return value from a function 'get_module' that tries to import the 'ICD10' would be False if the app is not installed and True if installed
Just a thought for the future, I noticed my local repo is starting to expand significantly due to fixtures/legacy-db's. Should ref-only data such as icd10, drugbank, etc, be kept separate from the repo and downloaded on-demand in production? Also the general advice is avoid storing binary data in repo's (fixtures need not be binary but for the data mentioned they will most likely be eventually supplied in their final binary format, eg, sqlite/postgresql db, ie, as legacy db's).
-D
--
You received this message because you are subscribed to the Google Groups "AuShadha" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aushadha+u...@googlegroups.com.
To post to this group, send email to aush...@googlegroups.com.
Visit this group at http://groups.google.com/group/aushadha.
For more options, visit https://groups.google.com/d/optout.
1) Switch to Postgres ASAP and leave it to the user while installing to generate the DBSo, this what I think can be done.Hi,
I am just having the same thoughts. Removing the 'big' fixtures, binary data that can be regenerated by scripts are to be done. Just yesterday, I contributed more to this bloat by pushing a commit that has another set of queries stored as .yaml. Most ill advised. My bad.
2) Small data can be provided as fixtures, but larger data like ICD10 , DrugBank, FDA Drug list can be either a python script that can generate the fixture / DB. This can be run based on the user at install time. I'm thinking of user profile like approach which allows you to switch on of off features at time of installation. Some thing like a PHP app thats lets you install selected "Extra features" at install time. I've not given thought on how to do this with Django. An approach I can think on top of my head is to actually creates an 'Installer" app that orchestrates all the setting up.
The down side to that ala carte approach would be that the DB row with foreignkey to ICD 10 NULL = False in applications like "Medical History", "Surgical History" cannot be set before hand and will have to be set on the fly based on whether the ICD app is going to get installed or not. With Django will require some effort ( please see Will Hardy's link I sent you earlier about dynamic models).
An approach to handle whether the DB row will alow NULL value setting based on whether the application is installed or not would be something like this pseudocode:icd10 = models.ForeignKey(null = get_module('icd10) , blank = get_module('icd10')
return value from a function 'get_module' that tries to import the 'ICD10' would be False if the app is not installed and True if installed
How does that sound ?
Again, but how will a user who decides to add in the ICD later cope with this ? Will he have to edit the DB schema by hand or use Django-migrations (improved support in Django 1.7) ? This is the question I asked myself and decided probably the 'registry' app along with the sub-apps goes into AuShadha as a stock app. Of course now we have to contend with providing efficient queries along with preventing bloat.
In fact, I had kind of foreseen this bloat to some extent. Hence the attempt to make AuShadha pluggable. In long run my idea was to create an AuShadha-core and some stock applications. Only the core will be in the present AuShadha repo. All the plugins / applications will reside in Au-Pluggable repo.
If we were to roll out PyPi packages, then user can install the applications that are needed alone using pip install. We can provide a 'Requirements.txt' for add on modules that are expected to work well with that release of AuShadha-core ( The Zope 3 KGS analogy) . However, this would be a additional step for installation and will require maintainence a lot many packages in separate repos.
Hope I am clear. Any ideas ?For me, it seems to be a toss between a how to provide a basic package with an efficient query system but one which is slightly bloated with one that is in separate packages (more maintanence ) and where we may have to handle dynamic django models.
Postgres, ok.
Should such db's be generated on the user's end or supplied pre-cooked with the associated plug-in? Downside of generating on-site is you still have to deliver the XML with AuShadha or provide an on-demand download mechanism. Former is impractical given the size of some of the XML data sources and the latter option you might have to do anyway (eventually)...
The trend seems to be to manage plug-in's internally with the advantage that you gain greater control over the process, can regularly check for updates and be independent of whatever mechanism is first used to install AuShadha. For examples I'd point at Eclipse and browser add-on's.
Re dynamic models, I'd like to digest it further and see real-world use-cases. Given the side effects I'd question the cost vs benefits of such an approach and, like meta-programming, suggest it's only to be used if there is no other option (KISS rules!). So, excusing my ignorance, why would NULL=False be used if ICD10/whatever is optional?...
To add to the above, it may be that once a user installs ICD10 (as a plug-in, post-install) that they *then* want this constraint but I'm betting there's a better way to handle this via indirection at run-time. Since your Django knowledge > mine, does that ring any bells for you? I'll look into it asap. Maybe I should "read-ahead" :-)...
I don't think there will be any conflict between bloat and queries. After the regular job of removing redundancy data is-what-it-is. Yes, it might grow a little for convenience but that is likely to significantly improve query performance (or completely avoid some queries) and the trade-off, when/if needed. will likely be worth it.
Good foresight and planning! I'm probably stating the obvious but you have recognised the need to modularise AuShadha and now have to consider how to uncouple these modules, ie, make them less co-dependant. I view this process as similar to normalisation's "nothing but the key", ie, we smell another plug-in... a "medical coding" plug-in(/module) perhaps? Needs some more thought.
Maybe just a repo or two for "good" and "untested" plug-in's? See comment above re managing plug-in's internally (sorry this stuff isn't presented more linearly).
Re any remaining/other custom install issues, if you were to go the pypi route, isn't "setup.py" specifically for this purpose?
Yes very ckear and I hope I have been clear and that my ideas make sense :-) If not I'll try better tomorrow. It sure would be good to have a wiki to capture this stuff in an organised manner.
Ah,
Thanks for clarifying the medical plugin thing. Nice idea ... Almost like a linker module. Borrowing zope again would it be an Adapter ?
Anyway, thanks for clarifying.
Glad you like my views.
Dr. Easwar T. R. DNB(Orth.), MNAMS
Consultant Paediatric Orthopaedic & Spine Surgeon
--
You received this message because you are subscribed to the Google Groups "AuShadha" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aushadha+unsubscribe@googlegroups.com.
To post to this group, send an email to aush...@googlegroups.com.
-D
--
You received this message because you are subscribed to the Google Groups "AuShadha" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aushadha+unsubscribe@googlegroups.com.To post to this group, send an email to aush...@googlegroups.com.
Visit this group at http://groups.google.com/group/aushadha.
For more options, visit https://groups.google.com/d/optout.