-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,104 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 18 additions & 4 deletions
22
app/src/main/java/org/commcare/dalvik/abha/model/LinkCareContextModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
package org.commcare.dalvik.abha.model | ||
|
||
import org.commcare.dalvik.domain.model.CCAuthModesRequestModel | ||
import org.commcare.dalvik.domain.model.CCLinkModel | ||
import org.commcare.dalvik.domain.model.CCPatientDetails | ||
import org.commcare.dalvik.domain.model.CCRequesterModel | ||
|
||
class LinkCareContextModel { | ||
lateinit var patientAbhaId: String | ||
lateinit var hipId: String | ||
lateinit var patient: PatientDetail | ||
lateinit var purpose: String | ||
lateinit var patient: CCPatientDetails | ||
|
||
} | ||
|
||
data class PatientDetail(var referenceNumber:String,var display:String,var careContexts:List<CareContextDetail>) | ||
fun getAuthModesRequestModel(authMode:String? = null) = try { | ||
CCAuthModesRequestModel(patientAbhaId, purpose, authMode, CCRequesterModel(id = hipId)) | ||
} catch (e: Exception) { | ||
null | ||
} | ||
|
||
fun getCCLinkRequestModel(accessToken:String):CCLinkModel{ | ||
return CCLinkModel(accessToken,hipId,patient) | ||
} | ||
|
||
} | ||
|
||
data class CareContextDetail(var referenceNumber: String,var display:String, var hiTypes:List<String>) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.