Merge branch 'dev' of github.com:dikstub-rssa/simrs-fe into feat/patient-63-adjustment
This commit is contained in:
No files matched your search
+15
-5
@@ -1,16 +1,26 @@
|
||||
import { medicalRoles, respPosCode } from '~/const/common/role'
|
||||
import type { UnitLevel, ServicePositionCode } from '~/const/common/role'
|
||||
import { medicalRoles, infraPositions } from '~/const/common/role'
|
||||
|
||||
export function getServicePosition(role?: string): string {
|
||||
export function getServicePosition(role?: string): ServicePositionCode {
|
||||
if(!role) {
|
||||
return 'none'
|
||||
}
|
||||
if (medicalRoles.includes(role)) {
|
||||
return 'medical'
|
||||
if (role in medicalRoles) {
|
||||
return 'med'
|
||||
} else if (role === 'emp|reg') {
|
||||
return 'registration'
|
||||
return 'reg'
|
||||
} else if (role.includes('|resp')) {
|
||||
return 'verificator'
|
||||
} else {
|
||||
return 'none'
|
||||
}
|
||||
}
|
||||
|
||||
export function genSpecHeadCode(unit_level: UnitLevel, unit_code: string): string {
|
||||
return `${unit_level}|${unit_code}|${infraPositions.head}`
|
||||
}
|
||||
|
||||
export function genUnitRespCode(unit_level: UnitLevel, unit_code: string): string {
|
||||
return `${unit_level}|${unit_code}|${infraPositions.resp}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user