diff --git a/cardlink-mock/src/main/kotlin/com/epotheke/cardlink/mock/ERezeptModel.kt b/cardlink-mock/src/main/kotlin/com/epotheke/cardlink/mock/ERezeptModel.kt index e02bf88..e67c2e5 100644 --- a/cardlink-mock/src/main/kotlin/com/epotheke/cardlink/mock/ERezeptModel.kt +++ b/cardlink-mock/src/main/kotlin/com/epotheke/cardlink/mock/ERezeptModel.kt @@ -159,6 +159,9 @@ enum class GenericErrorResultType(val value: String) { CARD_REVOKED("CARD_REVOKED"), CARD_INVALID("CARD_INVALID"), CARD_ERROR("CARD_ERROR"), + UNSUPPORTED_ENVELOPE("UNSUPPORTED_ENVELOPE"), + NO_PRESCRIPTIONS_AVAILABLE("NO_PRESCRIPTIONS_AVAILABLE"), + NOT_FOUND("NOT_FOUND"), UNKNOWN_ERROR("UNKNOWN_ERROR"); } @@ -169,9 +172,9 @@ sealed interface MedicationItem data class MedicationCompounding( val kategorie: String, val impfstoff: Boolean, - val herstellungsanweisung: String, + val herstellungsanweisung: String? = null, val verpackung: String? = null, - val rezepturname: String, + val rezepturname: String? = null, val darreichungsform: String? = null, val gesamtmenge: String, val einheit: String? = null, @@ -265,7 +268,7 @@ data class StreetAddress( val plz: String, val ort: String, val strasse: String, - val hausnummer: String, + val hausnummer: String? = null, val zusatz: String? = null, ) : Address diff --git a/demo-android-standalone/app/build.gradle.kts b/demo-android-standalone/app/build.gradle.kts index 6a84ef7..22a9244 100644 --- a/demo-android-standalone/app/build.gradle.kts +++ b/demo-android-standalone/app/build.gradle.kts @@ -44,7 +44,7 @@ android { } } -val epothekeSdkVersion = "1.1.8" +val epothekeSdkVersion = "1.1.9" dependencies { androidTestImplementation("androidx.test.ext:junit:1.1.5") diff --git a/demo-android-standalone/app/src/main/java/com/epotheke/demo/SdkActivityImp.kt b/demo-android-standalone/app/src/main/java/com/epotheke/demo/SdkActivityImp.kt index 1dbd358..717b848 100644 --- a/demo-android-standalone/app/src/main/java/com/epotheke/demo/SdkActivityImp.kt +++ b/demo-android-standalone/app/src/main/java/com/epotheke/demo/SdkActivityImp.kt @@ -78,7 +78,7 @@ class SdkActivityImp : SdkActivity() { * A successfull authentication via cardlink reveals the iccsn of the used card, which can then be stored in that list. * On might persist those for later use. */ - private var iccsns: MutableList = emptyList().toMutableList(); + private var iccsns: MutableList = emptyList().toMutableList(); /** * This method has to return the url of the epotheke service, and will be called in @@ -292,8 +292,8 @@ class SdkActivityImp : SdkActivity() { //store iccsn of card if(activationResult?.resultCode == ActivationResultCode.OK){ - val iccsnHex = activationResult.resultParameterKeys.filter { it.equals("CardLink::ICCSN") }.first() - iccsns.add(iccsnHex.encodeToByteArray()) + val iccsnHex = activationResult.getResultParameter("CardLink::ICCSN") + iccsns.add(iccsnHex) } @@ -331,6 +331,7 @@ class SdkActivityImp : SdkActivity() { * a couroutine scope, which enables us to perform the asynchronous communications in the background of the app. * To keep it simple we here just use runBlocking */ + @OptIn(ExperimentalStdlibApi::class) private fun startPrescriptionFlow(protocol: PrescriptionProtocol) { LOG.debug { "Start action for PrescriptionProtocol" } @@ -343,7 +344,7 @@ class SdkActivityImp : SdkActivity() { */ val result = protocol.requestPrescriptions( RequestPrescriptionList( - iccsns = listOf(iccsns.first()) + iccsns = listOf(iccsns.first().hexToByteArray()) ) ) @@ -362,7 +363,7 @@ class SdkActivityImp : SdkActivity() { val medication = bundle.arzneimittel medication.medicationItem.joinToString { item -> when (item) { - is MedicationCompounding -> item.rezepturname + is MedicationCompounding -> item.rezepturname ?: "Unknown" is MedicationFreeText -> item.freitextverordnung is MedicationIngredient -> item.listeBestandteilWirkstoffverordnung.joinToString(limit = 3) { i -> i.wirkstoffname } is MedicationPzn -> item.handelsname diff --git a/demo-ios-standalone/EpothekeDemo/Podfile b/demo-ios-standalone/EpothekeDemo/Podfile index dded0b7..cf991f7 100644 --- a/demo-ios-standalone/EpothekeDemo/Podfile +++ b/demo-ios-standalone/EpothekeDemo/Podfile @@ -6,7 +6,7 @@ target 'epothekeDemo' do use_frameworks! # Pods for epothekeDemo - pod 'epotheke-sdk','>= 1.1.8' + pod 'epotheke-sdk','>= 1.1.9' end diff --git a/demo-react-native/android/app/build.gradle b/demo-react-native/android/app/build.gradle index 0b644ab..b48d52b 100644 --- a/demo-react-native/android/app/build.gradle +++ b/demo-react-native/android/app/build.gradle @@ -123,7 +123,7 @@ android { } } -def epothekeSdkVersion = "1.1.8" +def epothekeSdkVersion = "1.1.9" dependencies { // The version of react-native is set by the React Native Gradle Plugin diff --git a/demo-react-native/ios/Podfile b/demo-react-native/ios/Podfile index fee82fc..2da5ee9 100644 --- a/demo-react-native/ios/Podfile +++ b/demo-react-native/ios/Podfile @@ -19,7 +19,7 @@ target 'demoReactNative' do config = use_native_modules! # Pod for epothekeDemo - pod 'epotheke-sdk','>= 1.1.8' + pod 'epotheke-sdk','>= 1.1.9' use_react_native!( :path => config[:reactNativePath], diff --git a/gradle.properties b/gradle.properties index 3be2ac3..bcc292e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,5 +11,5 @@ android.useAndroidX=true testHeapSize=1024m # project properties -version=1.1.9-SNAPSHOT +version=1.1.10-SNAPSHOT group=com.epotheke diff --git a/sdk/src/commonMain/kotlin/com/epotheke/erezept/model/PrescriptionModel.common.kt b/sdk/src/commonMain/kotlin/com/epotheke/erezept/model/PrescriptionModel.common.kt index 400eafe..7b7009f 100644 --- a/sdk/src/commonMain/kotlin/com/epotheke/erezept/model/PrescriptionModel.common.kt +++ b/sdk/src/commonMain/kotlin/com/epotheke/erezept/model/PrescriptionModel.common.kt @@ -188,6 +188,9 @@ enum class GenericErrorResultType(val value: String) { CARD_REVOKED("CARD_REVOKED"), CARD_INVALID("CARD_INVALID"), CARD_ERROR("CARD_ERROR"), + UNSUPPORTED_ENVELOPE("UNSUPPORTED_ENVELOPE"), + NO_PRESCRIPTIONS_AVAILABLE("NO_PRESCRIPTIONS_AVAILABLE"), + NOT_FOUND("NOT_FOUND"), UNKNOWN_ERROR("UNKNOWN_ERROR"); } @@ -199,9 +202,9 @@ sealed interface MedicationItem data class MedicationCompounding( val kategorie: String, val impfstoff: Boolean, - val herstellungsanweisung: String, + val herstellungsanweisung: String? = null, val verpackung: String? = null, - val rezepturname: String, + val rezepturname: String? = null, val darreichungsform: String? = null, val gesamtmenge: String, val einheit: String? = null, @@ -296,7 +299,7 @@ data class StreetAddress( val plz: String, val ort: String, val strasse: String, - val hausnummer: String, + val hausnummer: String? = null, val zusatz: String? = null, ) : Address