How to model a table in a relational database where all attributes are foreign keys to another table?

I’ve been working on the data model for a healthcare mobile app that will collect the user’s symptoms and will book an appointment with a doctor if requested by the user.

I was thinking the app would list the available symptoms and the patient could choose from them, and then the system would estimate some illness based on the chosen symptoms and perhaps this Illness record could be a foreign key in the Diagnosis table. Then, when booking an appointment, there would be a foreign key to this Diagnosis record in the Appointments table. Later, this Diagnosis tuple could be updated by the doctor during the appointment. The problem with this approach is that this way in the Diagnosis table we are only storing some estimated illness instead of the actual symptoms of the patient that were present when booking the appointment.

I’m having trouble figuring out the model for the Diagnosis table, and also what to include in the Appointments table (besides doctor name, appointment date etc. which are not relevant to the question) regarding the diagnosis provided by the app.

What do you suggest should constitute the Diagnosis table? Should I store the symptoms of the patient instead of the estimated illness and refer to this in the Appointments table rather than some illness which later might get overwritten by a doctor anyway? If so, this would mean that we don’t know how many attributes (symptoms) one record of the Diagnosis table could have, but they would all be just foreign keys to the Symptoms table.

Also, do you think I can model and do this in a relational database or should I be thinking of a NoSQL database?
I’m only listing the tables that I think are relevant to the question:

symptoms:            illnesses:                                 diagnosis:         appointments:

id    name           id    name               FK_symptoms?      id    ?    ?       id    FK_patient_name     FK_diagnosis
1     fever          1     pneumonia                            1                  1
2     chills         2     allergic rhinitis                    2                  2
3     sore throat    3     asthma                               ...                ...
4     headache       ...
...

What other approach would you suggest?

boot – Need to perform fresh OS installation UEFI, should I ude: “Enroll all Factory Default keys”?

The problem I have is that the USB Drives are no longer present in the list of Boot Devices, neither when I select Legacy Boot to Enable. Therefore I am unable to downgrade to a pre-2021 Windows 10 build, and I need to do that because the USB Root Hub fails with Error Code 10 from time to time since march 22 update.

My plan is to reinstall Windows 10 prior to that date setup which I have in a USB Disk but can´t boot from it neither changing to Secure or Legacy Boot Modes as the BIOS setup is now, and I thought maybe reseting everything to factory defaults including Secure Boot options relates to TPM.

Get user meta for only the keys with the prefix my_theme

There is a list of meta keys with the prefix my_theme, these are updated by the user. My problem is how to get_user_meta for only the keys with my_theme prefix. Tried a wildcard, didn’t work.

get_user_meta( $user_id, 'my_theme%', true  );

plugin wpml – Missing Meta Keys on WooCommerce orders

I have a WPML problem with order language being ignored, and according to WPML it is because there is no meta keys in the metabox on orders. I only see attributes. Especially wpml_languages are missing.

I have a fresh install with the same theme, the same WP version and the same plugins – here I do not have this problem.

I have 3 sites from the same DB copy, one local, one for testing and one live. Everyone has this problem.

Have tried switching to a default theme, disabling all plugins, updating everything, etc. Nothing helps.

Any idea what could be causing this?

macbook pro – Shortcut keys to delete all text to end of line (or all text after cursor)?

macbook pro – Shortcut keys to delete all text to end of line (or all text after cursor)? – Ask Different

Iterar las keys de los objetos

La funcion recibe dos objetos "obj1" y "obj2". Retornar las keys de las propiedades que sean únicas en cada objeto.

encryption – How to get Future Keys (Session Key) from IPEK for decryption data?

I’m new to DUKPT, so I’m not entirely clear about DUKPT and HSM. Right now, I’m trying to decrypt data (PAN number) from terminal.

So far, when I receive KSN and encrypted data, I understand that I need to find encryption key. From my HSM I can get IPEK based on (KSN, BDK). But here is the confusion, based on articles I read, and terminal vendor’s doc, encryption key will be one of the Future Keys.

  1. How would I know which Future Keys terminal uses as encryption key?
  2. How can HSM create Future Keys from IPEK?

Once I get correct Future Keys then I can derive data key variant and do decrypting in my HSM. I’m just stuck with these two questions.

Any explanation would be really helpful.

sql server – How can I use multiple primary keys in this stored procedure?

In the below stored procedure, the primary key is coming from a lookup table which stores the primary key columns. They can be one or more than one. Can someone help, how can I make it work for multiple primary keys?

Set @Query1 = N'DELETE STG.(' + @StageTable + ') FROM STG.' + @StageTable + ' a INNER JOIN LANDING.' + @LandingTable +
                            ' b ON a.' + @PrimaryKeys + ' = b.' + @PrimaryKeys
PRINT (@Query1)
EXEC sp_executesql @Query1

See, in the below table the Primary Key column will hold the primary keys of the table.

ID | ORACLESCHEMA|ORACLETABLE|DEVDWSCHEMA|DEVDWTABLE|COLUMNLIST|PrimaryKeys
1  | APPS        | SAMPLE    | DEVDW     | SAMPLE   | NULL     | ID, NAME
2  | AP          | SAMPLE2   | DEVDW     | SAMPLE2  | NULL     | ID,NAME,ORDER

The column list contains the list of columns in the table

keyboard – How to disable Page Up (Next) and Page Down (Prior) Keys

I ran xev and got te keycode for these two keys on my keyboard 117 and 112.

I then run
xmodmap -e "keycode 112=" and xmodmap -e "keycode 117=".

Sure enough the xev output for these keys now say they are mapped to NoSymbol

KeyRelease event, serial 34, synthetic NO, window 0x3400001,
    root 0x7c9, subw 0x0, time 13398507, (636,746), root:(1280,766),
    state 0x0, keycode 117 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

But the stupid keys are still working and getting in the way of my fat fingers.

Any idea what I am doing wrong and how to fix?

(Thank you!)

keyboard – macOS: repeat only certain keys

keyboard – macOS: repeat only certain keys – Ask Different

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123