Example #1
0
 public static void GetMedicineCard_20120101(this proxy.MedicineCardPortTypeClient client, proxy.Security sec, proxy.Header hd)
 {
     proxy.PrescriptionReplicationStatusStructureType pres;
     proxy.MedicineCardResponseType2 cardtypes;
     var tt = client.GetMedicineCard_20120101(
         sec,
         hd,
         new proxy.OnBehalfOfStructureType
     {
         AuthorisationIdentifier = Global.AuthIds[0]
     },
         SystemOwnerName: "Trifork",
         SystemName: "Trifork146",
         SystemVersion: "7.2",
         OrgResponsibleName: "CompuGroup Medical Denmark",
         OrgUsingName: "CompuGroup Medical Denmark",
         OrgUsingID: new proxy.OrgUsingID
     {
         Value      = "CompuGroup Medical Denmark",
         NameFormat = proxy.NameFormat.medcomcvrnumber
     },
         RequestedRole: Global.AuthIds[0],
         MedicineCardRequestStructure: new proxy.MedicineCardRequestStructureType
     {
         PersonCivilRegistrationIdentifier = Global.PatientCprs[1]
     },
         PrescriptionReplicationStatusStructure: out pres,
         MedicineCardResponseStructure: out cardtypes);
 }
Example #2
0
        public void TestDirectCall()
        {
            //Test mod lokal FMK service med lokal genereret SOSI kort
            var client = new proxy.MedicineCardPortTypeClient("localFMK");
            var ass    = SealUtilities.SignAssertion(AssertionMaker.MakeAssertion(), Global.MocesCprGyldig);

            client.GetMedicineCard_20120101(MakeSecurity(ass), MakeHeader());
        }
Example #3
0
        public void TestDirectCall_new()
        {
            var factory = CreateSOSIFactory(Global.MocesCprGyldig);
            var uid     = CreateMocesUserIdCard(factory);

            var ass = uid.Sign <dk.nsi.fmk.Assertion>(factory.SignatureProvider);

            //Test mod lokal FMK service med lokal genereret SOSI kort
            var client = new proxy.MedicineCardPortTypeClient("localFMK");

            client.GetMedicineCard_20120101(MakeSecurity(ass), MakeHeader());
        }
Example #4
0
        public void TestSTSogFMKAssertionAsType()
        {
            //Seal kort oprettes
            //FMK kaldes
            //Assertion overføres typestærkt
            var rsc = SealCard.Create(AssertionMaker.MakeAssertionForSTS(Global.MocesCprGyldig));
            var sc  = SealUtilities.SignIn(rsc, "http://www.ribeamt.dk/EPJ", Settings.Default.SecurityTokenService);

            var client = new proxy.MedicineCardPortTypeClient("localFMK");

            client.GetMedicineCard_20120101(MakeSecurity(sc.GetAssertion <proxy.Assertion>()), MakeHeader());
        }
Example #5
0
        public void TestSTSogFMKAssertionAsXml()
        {
            //Seal kort oprettes
            //FMK kaldes
            //Assertion overføres via SealCard som XML
            var rsc = SealCard.Create(AssertionMaker.MakeAssertionForSTS(Global.MocesCprGyldig));
            var sc  = SealUtilities.SignIn(rsc, "http://www.ribeamt.dk/EPJ", Settings.Default.SecurityTokenService);

            var client = new proxy.MedicineCardPortTypeClient("localFMK");

            using (var scope = new OperationContextScope(client.InnerChannel))
            {
                OperationContext.Current.OutgoingMessageHeaders.Add(new SealCardMessageHeader(sc));
                client.GetMedicineCard_20120101(null, MakeHeader());
            }
        }
Example #6
0
        public void TestSTSogFMKAssertionAsType_new()
        {
            //Seal kort oprettes
            //FMK kaldes
            //Assertion overføres typestærkt
            var factory = CreateSOSIFactory(Global.MocesCprGyldig);
            var uid     = CreateIdCardForSTS(factory);

            uid.Sign <Assertion>(factory.SignatureProvider);

            var idc = SealUtilities.SignIn(uid, "http://www.ribeamt.dk/EPJ", Settings.Default.SecurityTokenService);

            var client = new proxy.MedicineCardPortTypeClient("localFMK");

            client.GetMedicineCard_20120101(MakeSecurity(idc.GetAssertion <proxy.Assertion>()), MakeHeader());
        }
Example #7
0
        public void TestSTSogFMKAssertionAsXml_new()
        {
            //Seal kort oprettes
            //FMK kaldes
            //Assertion overføres via SealCard som XML
            var factory = CreateSOSIFactory(Global.MocesCprGyldig);
            var uid     = CreateIdCardForSTS(factory);

            uid.Sign <Assertion>(factory.SignatureProvider);

            var idc = SealUtilities.SignIn(uid, "http://www.ribeamt.dk/EPJ", Settings.Default.SecurityTokenService);

            var client = new proxy.MedicineCardPortTypeClient("localFMK");

            using (var scope = new OperationContextScope(client.InnerChannel))
            {
                OperationContext.Current.OutgoingMessageHeaders.Add(new IdCardMessageHeader(idc));
                client.GetMedicineCard_20120101(null, MakeHeader());
            }
        }