public ActionResult <HealthcareBC.Fabric.DocProof> UpdateProofDocument([FromForm] IFormFile proofDoc, string citizenIdentifier)
        {
            if (proofDoc.Length == 0)
            {
                return(null);
            }

            MemoryStream fileStream = new MemoryStream();

            proofDoc.CopyTo(fileStream);
            fileStream.Seek(0, SeekOrigin.Begin);
            var _proofDoc = _appService.PutProofDoc(proofDoc.FileName, fileStream, citizenIdentifier).Result;

            Mapper.Reset();
            Mapper.Initialize(cfg => cfg.CreateMap <HealthcareBC.Fabric.DocProof, HealthcareBC.ProofDocSvc.DocProof>());
            HealthcareBC.Fabric.DocProof retProof = Mapper.Map <HealthcareBC.Fabric.DocProof>(_proofDoc);

            return(retProof);
        }
        public ActionResult <HealthcareBC.Fabric.ContractTransaction> UpdateProfile(string citizenIdentifier, HealthcareBC.Fabric.DocProof docProof)
        {
            var transaction = _appService.UpdateProfileWithProofDocument(docProof, citizenIdentifier).Result;

            return(transaction);
        }
        async public Task <HealthcareBC.Fabric.ContractTransaction> UpdateProfileWithProofDocument(HealthcareBC.Fabric.DocProof docProof, string citizenIdentifier)
        {
            var         FabricEndpoint = ServiceEndPointResolver.GetServiceEndPoint(ServiceEndpoints.fabricEndPoint, null);
            FabricProxy FabricProxy    = new FabricProxy(FabricEndpoint, new HttpClient()
            {
                Timeout = new TimeSpan(0, 30, 0)
            });

            var transaction = await FabricProxy.UpdateProfileAsync(citizenIdentifier, docProof);

            //Indexing Service
            await LogTransaction(transaction, "Citizen Proof Document was checked and updated on Profile");

            return(transaction);
        }