public void sendSection(String message, int patientID, int authorID,
            String policy) {
        String token = requestToken(authorID, patientID);
        if (token == null) {
            JOptionPane.showMessageDialog(null, "No token received from server.", "No token", JOptionPane.ERROR_MESSAGE);
            return;
        }
        System.out.println("token:"+token);
        
        CipherKeyPair ckp = encrypt(message, policy);
//        DatabaseClient.getInstance().insertSection(patientID, authorID, ckp, policy);
        String decryptedToken = null;
        if(patientID==authorID){
            decryptedToken = decryptToken(token,true);
        }else{
           decryptedToken = decryptToken(token); 
        }
        if (DatabaseClient.getInstance().insertSection(patientID, authorID, ckp, policy, decryptedToken)) {
            JOptionPane.showMessageDialog(null, "Data record inserted successfully.", "Success", JOptionPane.INFORMATION_MESSAGE);
        } else {
            JOptionPane.showMessageDialog(null, "Couldn't insert data. Make sure you have sufficient rights.", "Failure", JOptionPane.ERROR_MESSAGE);
        }
    }