예제 #1
0
        public void Get_patient_program_details_Tests()
        {
            string      contractNumber = "InHealth001";
            string      context        = "NG";
            double      version        = 1.0;
            string      token          = "5356f171d6a485044c289330";
            string      patientId      = "5325dacdd6a4850adcbba75e";
            IRestClient client         = new JsonServiceClient();

            JsonServiceClient.HttpWebRequestFilter = x => x.Headers.Add(string.Format("Token: {0}", token));

            GetPatientProgramsResponse response = client.Get <GetPatientProgramsResponse>(
                string.Format(@"http://localhost:888/Nightingale/{0}/{1}/Patient/{2}/Programs/?Token={3}",
                              version,
                              contractNumber,
                              patientId,
                              token));
        }
예제 #2
0
        public void Get_Patient_Programs_summary()
        {
            string      url            = "http://localhost:8888/Program";
            string      patientID      = "5325dabfd6a4850adcbba732";
            string      contractNumber = "InHealth001";
            string      context        = "NG";
            double      version        = 1.0;
            string      token          = "535aa534d6a485044cc9f2ee";
            IRestClient client         = new JsonServiceClient();

            JsonServiceClient.HttpWebRequestFilter = x =>
                                                     x.Headers.Add(string.Format("{0}: {1}", "x-Phytel-UserID", "531f2df9072ef727c4d2a3df"));

            GetPatientProgramsResponse response = client.Get <GetPatientProgramsResponse>(
                string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Programs/?UserId=nguser",
                              url,
                              context,
                              version,
                              contractNumber,
                              patientID,
                              token));
        }