/// <summary> /// /// </summary> /// <param name="antwortHinweis"></param> /// <param name="clientKeyStore"></param> /// <param name="clientKeyStorePasswort"></param> /// <param name="konfiguration"></param> /// <param name="fachlicheAntwortXml"></param> /// <returns></returns> public static rzeAntwort ErstelleRzeAntwort(string antwortHinweis, X509Certificate clientCertificate, Pkcs12Store rzKeyStore, string rzKeyStorePasswort, SecurityKonfiguration konfiguration, XmlDocument fachlicheAntwortXml = null) { rzeAntwort antwort = new rzeAntwort(); antwort.hinweis = antwortHinweis; if (fachlicheAntwortXml != null) { XmlHelper.SignAndEncryptXml(fachlicheAntwortXml, rzKeyStore, rzKeyStorePasswort, konfiguration, clientCertificate); antwort.rzDatenBox = Standards.DefEncoding.GetBytes(ParseHelper.ConvertXmlDocumentToString(fachlicheAntwortXml)); } return(antwort); }
/// <summary> /// Erstellt ein Objekt vom Typ rzeAnfrage für die Methode verarbeiteAuftrag. Hier erfolgt die Zusammenführung /// der ApothekenInformation mit den fachlichen Daten. Die fachlichen Daten werden auf dem obersten Knoten des XML /// Dokument signiert und verschlüsselt und als Byte Array in dem Anfrage Objekt abgelegt. /// </summary> /// <param name="fachlicheAnfrageXml">Xml nach dem Schema RzeRezept Version xxxx</param> /// <param name="rzkdnr">Kundennummer der Apotheke</param> /// <param name="apoIk">ApothekenIK</param> /// <param name="apoInformation">Information zur Apotheke</param> /// <param name="apoLogMethode">Methode im fachlichen Sinne, welche die Apotheke beabsichtigt anzusprechen</param> /// <param name="softwarehersteller">Hersteller der Warenwirtschaft</param> /// <param name="softwarename">Name der Warenwirtschaft</param> /// <param name="softwareversion">Version der Warenwirtschaft</param> /// <param name="clientKeyStore">KeyStore mit dessen Informationen das XML verschlüsselt werden soll</param> /// <param name="clientKeyStorePasswort">Passwort zum KeyStore des Clients</param> /// <param name="konfiguration">Sicherheitskonfiguration für die Verschlüsselung</param> /// <param name="rzCertificate">Zertifikat des Rechenzentrums</param> /// <returns></returns> public static rzeAnfrage ErstelleRzeAnfrageObjekt(XmlDocument fachlicheAnfrageXml, string rzkdnr, string apoIk, string apoInformation, string apoLogMethode, string softwarehersteller, string softwarename, string softwareversion, Pkcs12Store clientKeyStore, string clientKeyStorePasswort, SecurityKonfiguration konfiguration, X509Certificate rzCertificate) { rzeAnfrage anfrage = new rzeAnfrage(); XmlHelper.SignAndEncryptXml(fachlicheAnfrageXml, clientKeyStore, clientKeyStorePasswort, konfiguration, rzCertificate); //Bilde das RzeAnfrage Objekt: apoInformation apoInfoObjekt = new apoInformation(); apoInfoObjekt.rzKdNr = rzkdnr; apoInfoObjekt.apoIk = apoIk; apoInfoObjekt.apoInfo = apoInformation; apoInfoObjekt.apoLogMethode = apoLogMethode; apoInfoObjekt.apoSwHersteller = softwarehersteller; apoInfoObjekt.apoSwName = softwarename; apoInfoObjekt.apoSwVersion = softwareversion; anfrage.apoInformation = apoInfoObjekt; anfrage.rzDatenBox = Standards.DefEncoding.GetBytes(ParseHelper.ConvertXmlDocumentToString(fachlicheAnfrageXml)); return(anfrage); }