26 lines
781 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.example.caseData.utils;
public class IntToString {
/**
* 将医生职称转换为整数。
*
* @param title 医生职称字符串
* @return 职称对应的整数值0:未知 1:主任医师 2:主任中医师 3:副主任医师 4:副主任中医师 5:主治医师 6:住院医师)
*/
public static String DoctorTitleToString(Integer title) {
if (title == null) {
return "未知";
}
return switch (title) {
case 1 -> "主任医师";
case 2 -> "主任中医师";
case 3 -> "副主任医师";
case 4 -> "副主任中医师";
case 5 -> "主治医师";
case 6 -> "住院医师";
default -> "未知";
};
}
}