Commit a050a661 by 霍志良

Merge branch 'medical_zl_diagnose' into 'dev_medical'

【C】复诊续方及处方优化

See merge request app_android_lib/YDL-Component!366
parents 0af98d7e cf8c73a7
......@@ -10,7 +10,7 @@ ext {
"m-fm" : "0.0.30.03",
"m-user-medical" : "0.0.62.14",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.47",
"m-im-medical" : "0.0.21.55",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.10",
......@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.41.61",
"ydl-platform" : "0.0.41.63",
//第二步 若干
"ydl-webview" : "0.0.38.57",
......@@ -94,7 +94,7 @@ ext {
"m-fm" : "0.0.30.01",
"m-user-medical" : "0.0.62.14",
"m-home" : "0.0.22.70",
"m-im-medical" : "0.0.21.47",
"m-im-medical" : "0.0.21.55",
"m-dynamic" : "0.0.7.28",
"m-article" : "0.0.0.8",
......@@ -116,7 +116,7 @@ ext {
//-------------- 功能组件 --------------
//第一步
"ydl-platform" : "0.0.41.61",
"ydl-platform" : "0.0.41.63",
//第二步 若干
"ydl-webview" : "0.0.38.57",
......@@ -234,13 +234,13 @@ ext {
"umeng-common" : "com.umeng.umsdk:common:9.5.1",
"umeng-asms" : "com.umeng.umsdk:asms:1.4.1",
// //友盟社会化分享
// "umeng-share-core" : "com.umeng.umsdk:share-core:7.1.4",
// "umeng-share-qq" : "com.umeng.umsdk:share-qq:7.1.4",
"umeng-share-core" : "com.umeng.umsdk:share-core:7.1.4",
"umeng-share-qq" : "com.umeng.umsdk:share-qq:7.1.4",
"umeng-share-wechat" : "com.umeng.umsdk:share-wx:7.1.4",
// //分享面板
// "umeng-shareboard" : "com.umeng.umsdk:share-board:7.1.4",
"umeng-shareboard" : "com.umeng.umsdk:share-board:7.1.4",
"umeng-wx-guanfang" : "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.6.5",
// "umeng-qq-guanfang" : "com.tencent.tauth:qqopensdk:3.51.2",
"umeng-qq-guanfang" : "com.tencent.tauth:qqopensdk:3.51.2",
"tablayout" : "com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar",
"stetho" : "com.facebook.stetho:stetho:1.5.0",
"stetho-okhttp3" : "com.facebook.stetho:stetho-okhttp3:1.4.1",
......
package com.yidianling.im.bean
class MedicineItemBean {
var medicineApplyNumber: Int? = 0
var medicineName: String = ""
var medicineSpec: String = ""
}
\ No newline at end of file
......@@ -55,6 +55,7 @@ import com.yidianling.im.session.extension.CustomAttachmentOrderAlreadyDone;
import com.yidianling.im.session.extension.CustomAttachmentOrderStatus;
import com.yidianling.im.session.extension.CustomAttachmentPatientCheckIn;
import com.yidianling.im.session.extension.CustomAttachmentPatientFullInfo;
import com.yidianling.im.session.extension.CustomAttachmentPatientMedicineApply;
import com.yidianling.im.session.extension.CustomAttachmentPhoneCallSystemNotice;
import com.yidianling.im.session.extension.CustomAttachmentRecipel;
import com.yidianling.im.session.extension.CustomAttachmentRecommendAssistant;
......@@ -87,6 +88,7 @@ import com.yidianling.im.session.viewholder.MsgViewHolderOrderAlreadyDone;
import com.yidianling.im.session.viewholder.MsgViewHolderOrderStatus;
import com.yidianling.im.session.viewholder.MsgViewHolderPatientCheckIn;
import com.yidianling.im.session.viewholder.MsgViewHolderPatientFullInfo;
import com.yidianling.im.session.viewholder.MsgViewHolderPatientMedicineApply;
import com.yidianling.im.session.viewholder.MsgViewHolderPerfectConsultData;
import com.yidianling.im.session.viewholder.MsgViewHolderPhoneCallSystemNotice;
import com.yidianling.im.session.viewholder.MsgViewHolderRecipel;
......@@ -458,6 +460,7 @@ public class SessionHelper {
NimUIKit.registerMsgItemViewHolder(CustomAttachmentRecipel.class, MsgViewHolderRecipel.class);//处方单创建消息类型
NimUIKit.registerMsgItemViewHolder(CustomAttachmentPatientCheckIn.class, MsgViewHolderPatientCheckIn.class);//患者报到
NimUIKit.registerMsgItemViewHolder(CustomAttachmentPatientFullInfo.class, MsgViewHolderPatientFullInfo.class);//就诊者完善信息
NimUIKit.registerMsgItemViewHolder(CustomAttachmentPatientMedicineApply.class, MsgViewHolderPatientMedicineApply.class);//开药申请
}
......
......@@ -42,6 +42,9 @@ public class CustomAttachParser implements MsgAttachmentParser {
case CustomAttachmentType.TYPE_PATIENT_CHECK_IN:
attachment = new CustomAttachmentPatientCheckIn();
break;
case CustomAttachmentType.TYPE_PATIENT_MEDICINE_APPLY:
attachment = new CustomAttachmentPatientMedicineApply();
break;
default:
// attachment = new CustomAttachmentFilter();
break;
......
package com.yidianling.im.session.extension
import com.alibaba.fastjson.JSON
import com.alibaba.fastjson.JSONObject
import com.yidianling.im.bean.MedicineItemBean
/**
* Created by Ykai on 2021/11/12.
*
* 患者报道消息解析器
*/
class CustomAttachmentPatientMedicineApply :
CustomAttachment(CustomAttachmentType.TYPE_PATIENT_MEDICINE_APPLY) {
private val TITLE = "title"
private val VISITAPPLYNO = "visitApplyNo"
private val MEDICINELIST = "medicineList"
var title: String? = null
var visitApplyNo: String? = null
var medicinelist = mutableListOf<MedicineItemBean>()
override fun parseData(data: JSONObject) {
title = data.getString(TITLE)
visitApplyNo = data.getString(VISITAPPLYNO)
medicinelist = JSON.parseArray(
data.getString(MEDICINELIST),
MedicineItemBean::class.java
) as MutableList<MedicineItemBean>
}
override fun packData(): JSONObject {
val data = JSONObject()
data[TITLE] = title
data[VISITAPPLYNO] = visitApplyNo
data[MEDICINELIST] = medicinelist
return data
}
}
\ No newline at end of file
......@@ -63,4 +63,5 @@ public interface CustomAttachmentType {
int TYPE_RECIPE = 86;//处方单创建消息类型
int TYPE_PATIENT_FULL_INFO = 87; // 就诊患者完善信息
int TYPE_PATIENT_CHECK_IN = 88; // 患者报到
int TYPE_PATIENT_MEDICINE_APPLY = 89; // 开药申请
}
package com.yidianling.im.session.viewholder
import android.widget.TextView
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity
import com.ydl.ydlcommon.base.config.HttpConfig.Companion.MEDICAL_H5URL
import com.yidianling.im.R
import com.yidianling.im.session.extension.CustomAttachmentPatientMedicineApply
import com.yidianling.im.session.viewholder.adapter.AdapterMedicineApply
import com.yidianling.nimbase.common.ui.recyclerview.adapter.BaseMultiItemFetchLoadAdapter
import com.yidianling.uikit.business.session.viewholder.MsgViewHolderBase
/**
* 就诊人提示补充信息ui
*/
class MsgViewHolderPatientMedicineApply(adapter: BaseMultiItemFetchLoadAdapter<*, *>?) :
MsgViewHolderBase(adapter) {
private lateinit var medicine_title: TextView
private lateinit var medicine_list: RecyclerView
private lateinit var itemBean: CustomAttachmentPatientMedicineApply
private lateinit var adapterMedicine: AdapterMedicineApply
override fun getContentResId(): Int {
return R.layout.im_nim_patient_medicine_apply_layout
}
override fun inflateContentView() {
medicine_title = findViewById(R.id.medicine_title)
medicine_list = findViewById(R.id.medicine_list)
}
override fun bindContentView() {
itemBean = message.attachment as CustomAttachmentPatientMedicineApply
medicine_title.text = itemBean.title
adapterMedicine = AdapterMedicineApply()
medicine_list.layoutManager = LinearLayoutManager(context)
medicine_list.adapter = adapterMedicine
if (itemBean.medicinelist.size > 2) {
itemBean.medicinelist?.let {
val subList = it.subList(0, 2)
adapterMedicine.setTagData(subList)
}
} else {
itemBean.medicinelist?.let { adapterMedicine.setTagData(it) }
}
}
override fun onItemClick() {
//跳转开药详情页面
val h5Params3 = H5Params(
MEDICAL_H5URL + "\n" +
"ct/drug/apply/details?visitApplyNo=${itemBean.visitApplyNo}&hideNavBar=1", null
)
NewH5Activity.start(context, h5Params3)
}
}
\ No newline at end of file
package com.yidianling.im.session.viewholder.adapter
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import com.yidianling.im.R
import com.yidianling.im.bean.MedicineItemBean
/**
* @author huozhiliang
* @描述:
* @Copyright Copyright (c) 2018
* @Company 壹点灵
* @date 2020/9/7
*/
class AdapterMedicineApply : RecyclerView.Adapter<AdapterMedicineApply.ViewHolder>() {
private var medicineList: MutableList<MedicineItemBean>? = mutableListOf()
class ViewHolder(itemView: View) :
RecyclerView.ViewHolder(itemView) {
val medicine_name: TextView = itemView.findViewById(R.id.medicine_name)
val medicine_count: TextView = itemView.findViewById(R.id.medicine_count)
val medicine_spec: TextView = itemView.findViewById(R.id.medicine_spec)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
return ViewHolder(
LayoutInflater.from(parent.context).inflate(
R.layout.im_message_item_medicine_apply,
parent,
false
)
)
}
override fun getItemCount(): Int {
return medicineList?.size ?: 0
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.medicine_name.text = medicineList?.get(position)?.medicineName
holder.medicine_spec.text = "规格:" + medicineList?.get(position)?.medicineSpec
holder.medicine_count.text = "x" + medicineList?.get(position)?.medicineApplyNumber
}
fun setTagData(data: MutableList<MedicineItemBean>) {
medicineList = data
notifyDataSetChanged()
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<stroke
android:width="0.5dp"
android:color="#e7ecf0" />
<corners
android:bottomLeftRadius="8dp"
android:bottomRightRadius="8dp"
android:topLeftRadius="8dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white" />
<stroke
android:width="0.5dp"
android:color="#e7ecf0" />
<corners android:topLeftRadius="8dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/platform_dp_12">
<TextView
android:id="@+id/medicine_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:singleLine="true"
android:textColor="@color/medical_color_0c1d31"
android:textSize="@dimen/platform_sp_16"
app:layout_constraintEnd_toStartOf="@id/medicine_count"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="复方醋酸地塞米松乳膏30g" />
<TextView
android:id="@+id/medicine_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#65758a"
android:textSize="@dimen/platform_sp_16"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="x3" />
<TextView
android:id="@+id/medicine_spec"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_6"
android:textColor="#65758a"
android:textSize="@dimen/im_text_size_13"
app:layout_constraintStart_toStartOf="@id/medicine_name"
app:layout_constraintTop_toBottomOf="@id/medicine_name"
tools:text="规格:0.5g*12片*3板/盒">
</TextView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="255dp"
android:layout_height="wrap_content"
android:background="@drawable/shape_solid_white_stroke_e7ecf0_top">
<View
android:id="@+id/back_top"
android:layout_width="match_parent"
android:layout_height="45dp"
android:background="@drawable/shape_solid_white_stroke_e7ecf0_top2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/medicine_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/platform_dp_16"
android:textColor="@color/medical_color_007aef"
android:textSize="@dimen/im_text_size_17"
app:layout_constraintBottom_toBottomOf="@id/back_top"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:text="开wwwww药申请" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/medicine_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/platform_dp_16"
android:layout_marginTop="@dimen/platform_dp_16"
android:paddingEnd="@dimen/platform_dp_16"
app:layout_constraintTop_toBottomOf="@id/back_top"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:itemCount="2" />
<View
android:id="@+id/line_center"
android:layout_width="0dp"
android:layout_height="1px"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="12dp"
android:background="@color/medical_color_e7ecf0"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/medicine_list" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:layout_marginBottom="14dp"
android:background="@drawable/medical_bg_3464ec_14dp"
android:text="申请详情"
android:textColor="@color/medical_color_007aef"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/line_center"
app:layout_constraintTop_toBottomOf="@id/line_center" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -71,4 +71,5 @@
<color name="medical_color_c0c9d4">#C0C9D4</color>
<color name="medical_color_e7ecf0">#E7ECF0</color>
<color name="medical_color_ff7766">#FF7766</color>
<color name="medical_color_007aef">#007aef</color>
</resources>
......@@ -143,12 +143,12 @@ dependencies {
api rootProject.ext.dependencies["eventbus"]
api rootProject.ext.dependencies["umeng-common"]
api rootProject.ext.dependencies["umeng-asms"]
// api rootProject.ext.dependencies["umeng-share-core"]
// api rootProject.ext.dependencies["umeng-share-qq"]
api rootProject.ext.dependencies["umeng-share-core"]
api rootProject.ext.dependencies["umeng-share-qq"]
api rootProject.ext.dependencies["umeng-share-wechat"]
// api rootProject.ext.dependencies["umeng-shareboard"]
api rootProject.ext.dependencies["umeng-shareboard"]
api rootProject.ext.dependencies["umeng-wx-guanfang"]
// api rootProject.ext.dependencies["umeng-qq-guanfang"]
api rootProject.ext.dependencies["umeng-qq-guanfang"]
api rootProject.ext.dependencies["stetho"]
api rootProject.ext.dependencies["stetho-okhttp3"]
api rootProject.ext.dependencies["bugly-crashreport"]
......
......@@ -50,7 +50,7 @@ class ActionCountUtils {
appName = name
// 获取oaid
UMConfigure.getOaid(BaseApp.instance) {
oaId = it
it?.let { oaId = it }
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment