-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database Documentation #552
Comments
Hello @aethelwulffe @teryhill, please give the details of following tables (it will contain almost all):
Will ask for more tables soon. Else this post will become lengthy. |
Hello @aethelwulffe if it is possible for you then please give a brief of each field in table, it will certainly be a great help. Although some fields are clear through their comments but if we get actual info then it will help in refactoring the database. Also which tables are linked with them.
|
I would like to ask one more thing, are we going to use Eloquent ORM? I am working on stuff to communicate using dummy data. (Not in this project a sample application). Some posts from forum seems to be deleted where Kevin mentioned about ORM. |
Having never used ORM, I cannot say what all that involves. Perhaps you can give me an idea of footprint etc... I am really sick, and at the end of a long day, so I am going to have to be brief on the table descriptions for now. I don't have immediate knowledge of the audit tables. They are related to a seldom used feature of the same name. They were likely added in an effort to satisfy some regulation Automatic notification, batchcom, and several other related comm functions are features I have never seen successfully implemented. Tony could probably say more, and I will when I have a bit more time... |
Ok @aethelwulffe No issues. You take proper rest. We can discuss it later. 🙂 Regarding ORM i'll update in the evening or night. |
Hello @aethelwulffe can you please explain the core tables and their relationships? Also please explain the column fields if possible, they help a lot in getting the structure. |
Hi Pri,
I am working on just that. I am adapting the scripts that generate fake
patients into a set of docs. I figure that is a guaranteed set of
relational mapping.
…On 2017-05-29 14:15, Priyanshu Sinha wrote:
Hello @aethelwulffe <https://github.com/aethelwulffe> can you please
explain the core tables and their relationships? Also please explain
the column fields if possible, they help a lot in getting the structure.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#552 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAhzFxwE1ejBafv2XRmi33XHFVcQVIpWks5r-wsmgaJpZM4NlobB>.
|
Hello @aethelwulffe , I'm posting new structure here itself. You please check it and let me know if incorrect or any improvements required.
Note
Also please brief me about |
All the above looks fine. Please drop the |
ar_session tracks each time a payment is entered into the system.
ar_activity tracks payment activity against each line item (that is billable) in the
Naturally, all the above are related to the |
Hello @aethelwulffe need some info for
This are unfigured. Rest I have broken down into 7 tables. I will post it tomorrow. You please clear the above. |
Hello @aethelwulffe Can this |
I see no reason why it should not. The interface(s) have to determine
how that touchlist works though. That involves the damn layout engine,
which likes to make changing how anything is done very difficult.
…On 2017-06-01 01:35, Priyanshu Sinha wrote:
Hello @aethelwulffe <https://github.com/aethelwulffe> Can this
|address| table can be used to store address of patient and employer?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#552 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAhzFzskzkZcdZJwIUVs146tg-GUU4mxks5r_k2wgaJpZM4NlobB>.
|
Hello @aethelwulffe . I am now posting structure for Now structure of each table :
Note : I kept SSN for varchar(256) because I think they must not be stored in plain text. They must be encrypted. Unique because it must be unique for one person.
Note : Initially providerID and ref_providerID are defined to be NULL. Also last column is country_code but we are storing name of country.
Note : 0 -> No/Disable & 1 -> Yes/Enable
Note : homeless assuming to be boolean like yes/no.
Note : Relationships which I considered is :
Please look at it and correct me wherever I'm wrong. Also provide the details of fields mentioned in above post. |
None of it is necessarily wrong. Important things to note: Drop SSN. It is not, and should not be used in a medial setting...for anything...ever. The abbreviation "pid" or patient ID is very common in the medical industry, and it descriptive enough as a UUID field for a patient record. Just as importantly, it is the record (vs row index) touchlist field that almost everything else in the EHR looks for. I know it is (initially) the same as the index id field, but with data migrations and integrations from other systems, keeping it is probably a good idea. "pubpid" is extraneous though. If you are using just the PID as a UUID field in all the 1:1 or one-to-many associations, you don't really need record row indexes for the other tables. I assume you are taking the layout engine that drives the current UI into account. It uses other tables than patient_data, but each table has a tab grouping and ordering layout configuration (with additional data types) it uses to make up the displays. It can all be adapted to new table configurations of course, with or without removing the user's ability to alter the base table schema. The preference would be to keep the base patient data type tables clean, then use a join against "custom_demographics" or something like that to provide a place for user-configured fields to be added, while preserving layout utilities (unless someone is replacing the whole Layout Engine and Layout Based Forms system). Some other suggestions: ProviderID: This should be a one-to-many association. A patient may have many providers in a clinic. An associative note or list (customizable) for that relationship would be useful. If the list printed out on the screen
Getting the fields down to the bare minimum, then making all others either custom or optional standard additions to the schema on demand would be my preferred way of designing this. The patient privacy section should be looked at closely just to make sure nothing extraneous is in there, and we know what those flags actually control within the application. Anything with the letters "hippa_" in the name should be looked at with deep suspicion. Those where added by someone that was not even competent enough to know that the abbreviation is "HIPAA" not HIPPA, and HIPAA is a US-only thing. While the function of validating what lines of communication the patient has authorized and in what way those lines of communication should be used is very important, they are international issues, and need field names, not misspelled references to a piece of healthcare privacy legislation that predated the concept of email. |
Hello @aethelwulffe
This means I should remove it. Also I will drop SSN and include pid.
Probably this is for all the above columns which I mentioned. right? So I will create another table and get that linked with patient data.
I am not able to get it. Can you please elaborate it more?
Ok. Right now I have implemented as |
Providers should be many-to-many...right...sort of. It is actually one (patient) to many (Providers) but each provider is a list that is used by all patients. We look up a provider's patients by joining the patient table where ProviderID IN(). It may be better to leave this relationship as an expanded custom field where someone adds more lists of providers to their flat table if they want. This will let them add a label to the field and all that...I dunno.
I am sure the FHIR standard has a more complete or comparable system for this. I know we do for some of our evaluation forms that link all sorts of data to case management studies. The important bit is to control access and prioritize contacts. |
Ok @aethelwulffe Now I got it. Sure I will make this and will let you know. Just confirm me few things...
|
Privacy table is about how to treat contact information. If you put that information in the actual contact listings (people, phone numbers etc...) then you don't need a privacy table itself, as you now have granular control over the behavior of each item. My advice is still to go through the tables and get rid of totally unneeded tables and fields before actually changing base table structures. That would be the easier and early deliverable. The users table(s) are actually much simpler to revise than the patient_data by a large factor, due to the fact they are called less often, and affect fewer things. They still require some of the same ideas to refactor them properly. patient_data is found 833 times in the code base. I just realized that not only is the new "patient portal" (I think everything under webroot/patient) chock full of hard-coded field names that seem like would cause everything to break if anything were changed, but that whole thing would need to be refactored too.... |
Now I got that. You mean that patient's contact may be a patient itself or not. Also a patient can prioritise his/her contact's list in order to send data in case of emergency. If he/she sets the priority then he/she must share privacy communication means like email, phone, etc. I will have to look at this and will let you know.
Ok. Will soon present the list. 🙂 |
These are the immediate list of tables to be deleted. I will update the list while I proceed.
|
Hello @aethelwulffe ... It seems that most of the tables are related either with patient or users. So I think I must go for them first. And regarding unused tables, it requires yours and @teryhill collaboration, as I grepped most of the tables (will not say all) and they are used in code. So I can't figure out whether they are in use or not. So please assist me in this task. |
Hello @aethelwulffe @teryhill , please look at the following structure :
Note : This will create many to many relationship.
Example :
id | email | ....................
- id | name | ...............
- id | pid | contact_id - id | contact_id | patient_id | allow_health_info | allow_imm_info | allow_patient_portal | ....... Note : This way we can see that, pid = 1 has two contacts 2 & 3. But different information are shared with contact 2 and contact 3. - id | contact_id | patient_id | hippa_email | hippa_voice | ......... same explanation as above. You please look at it and tell me if this is ok? If anything I'm missing then please let me know, I'll correct it. **Side Note : **
Also can you please brief me about the |
Ohh... sorry @aethelwulffe . I thought that globals tab are static and will not change. 😞 |
Well, the good part is that we just merged a search tool for the Globals interface...makes things simpler on the UI side. |
Hello @aethelwulffe , I got your point. Increasing tables will only help in easy maintenance. My mistake. |
Not a mistake...easy maintenance is nice. Needing multiple joins in
queries makes it less nice though, and there are other issues of course.
…On 2017-07-23 13:55, Priyanshu Sinha wrote:
Hello @aethelwulffe <https://github.com/aethelwulffe> , I got your
point. Increasing tables will only help in easy maintenance. My mistake.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#552 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAhzF6gRupQJYEL-TAKaqIu507hrLhWuks5sQ4kFgaJpZM4NlobB>.
|
Yeah.. And shall we create another thread for discussion? You start that with billing information.. 😄 |
Heh. Yeah, I will start with finding all the billing stuff in this thread...and pulling it over there! |
Hello @aethelwulffe , What is |
one more edit in As i see that globals table is no where related to other tables, so we do not have any foreign key constraints. Also, not every value is What you say? |
I'd say I am lost. Perhaps re-state the questions, or someone else can chime in. |
@aethelwulffe , some thing like this :
This will get stored in a field. something like 'settings'. |
@pri2si17-1997 globals is like a config table. It holds the settings from globals. The user _settings file interacts with the globals table. You need to consider the user_settings table when you make changes to the globals table. To add the json items you will need to change /interface/super/edit_globals.php |
Hello @teryhill , I am asking that is this type of structure ok? Some more information :
And the above structure will get saved in settings column. @aethelwulffe Am I clear now? |
@pri2si17-1997 What would be the advantage to it? Will it require extensive program changes to use it? Gloabls are used through out the system. |
Advantages mainly include flexibility and separation of values in the sense that we will know which values are enabled/stored for which tab (that's why I included tab_name in example.). We can add any no of information to that field, and at the time of updation, we need to look for that particular key in data, and just update that value (using key-value pair). Regarding extensive program change, I may not be able to provide exact answer right now, as it needs a lot of query to be revised, so may be YES. |
I would say add the field, put the coding to use it far down the priority list. |
Means, add a json field? Or leave it as in the present structure? |
Unless @aethelwulffe see's a reason for not adding the json field. I vote add it. |
ok. Thanks @teryhill ... 🙂 |
I said I am lost. If Terry said do it, then do it...and he did say do it...so go ahead and do it! 🤣 |
ok. Thanks @aethelwulffe @teryhill ... 😃 |
@pri2si17-1997 I hope you know this project will have work even after GSoC. You have a lot of Items that are going to be hidden until this is implemented and tested. Then more Idea's will be generated. Actually all 3 projects are in this same situation. |
Yes @teryhill . I know it and yes I will contribute even after GSoC as I took the responsibility for Laravel, so I must complete it. 🙂 |
A man with integrity , I like that |
Hello @aethelwulffe @teryhill Some Questions :
|
The refusal reason , ordering provider and administered by are things that are needed in the future. Don't drop them. @aethelwulffe this was stuff that was being worked on at the fork for MU. |
Ok @teryhill and what about point 2 & 3 ? |
keep point 3. point 2 no they are not the same here is a code snipit. Not sure what the immunization id is.
|
Ok... :| |
immunization_id may be, or is intended to be, the ID from the code list
(not the CVX code though, the administration CPT4 or HCPCS), or possibly
a warehouse batch number. These would not be the same as the index.
CPT CODE CPT Description CVX Code
90698 Diphtheria, tetanus toxoids, and acellular pertussis vaccine,
haemophilus influenza Type B, and poliovirus vaccine, inactivated (DTaP
- Hib - IPV), for intramuscular use 120
…On 2017-07-26 11:38, Terry Hill wrote:
keep point 3. point 2 no they are not the same here is a code snipit.
Not sure what the immunization id is.
|id = ?, administered_date = if(?,?,NULL), immunization_id = ?,
cvx_code = ?, |
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#552 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAhzF6F95icFiD2Eex98zY6Ng5IkN2PCks5sR11xgaJpZM4NlobB>.
|
Hello @aethelwulffe @teryhill @tmccormi
This issue is regarding proper documentation of database and its tables. We can have simultaneous update in table structure if needed and add it here.
The text was updated successfully, but these errors were encountered: