public string LinkPhysicianToPatient(LinkingPhysicianRequest request)
        {
            PatientChain patientChain = new PatientChain();
            var          reply        = patientChain.AddPhysician(request.Address, request.PatientId, request.BsnNumber, request.SignMessage);

            return(reply ? "{ \"Result\": \"Ok\" }": "{ \"Result\": \"Failure\" }");
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            PatientChain patientChain = new PatientChain();
            var          config       = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            var          privatekey   = config.AppSettings.Settings["privkey"].Value;
            var          address      = config.AppSettings.Settings["address"].Value;

            patientChain.AddPhysician(address, docId.Text, patientView.SelectedItems[0].SubItems[2].Text, patientChain.SignMessage(privatekey, docId.Text));
        }