Skip to content

Commit

Permalink
health id added in link context care request
Browse files Browse the repository at this point in the history
  • Loading branch information
RawatH committed Jan 21, 2024
1 parent dcf6544 commit c32b721
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.commcare.dalvik.domain.model.CCRequesterModel
class LinkCareContextModel {
lateinit var patientAbhaId: String
lateinit var hipId: String
lateinit var healthId: String
lateinit var purpose: String
lateinit var patient: CCPatientDetails

Expand All @@ -19,7 +20,7 @@ class LinkCareContextModel {
}

fun getCCLinkRequestModel(accessToken:String):CCLinkModel{
return CCLinkModel(accessToken,hipId,patient)
return CCLinkModel(accessToken,hipId,patient,healthId)
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ class CCFetchAuthModeFragment : BaseFragment<CCAuthModeBinding>(CCAuthModeBindin
linkCareContextModel.hipId = it
}

it.getString("healthId")?.let {
linkCareContextModel.healthId = it
}

val UTC_DIFF = (30 * 60 * 1000) + (5 * 60 * 60 * 1000)

it.getString("patientDetail")?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ data class ConfirmAuthModel(val transactionId:String,val credential: Credential)
data class Credential(var authCode:String?)

// CARE CONTEXT LINKING API
data class CCLinkModel(val accessToken:String,@SerializedName("hip_id") val hipId:String,val patient:CCPatientDetails)
data class CCLinkModel(val accessToken:String,@SerializedName("hip_id") val hipId:String,val patient:CCPatientDetails,val healthId: String)

data class CCPatientDetails(val referenceNumber:String,val display:String,val careContexts:List<CCDetail>)

Expand Down

0 comments on commit c32b721

Please sign in to comment.