Refactor new-patient.html: Integrated Choices.js and Flatpickr, removed Bootstrap dependency

This commit is contained in:
pjs
2025-12-14 22:50:00 +09:00
parent c5dba42b4c
commit 521aa41a18
13 changed files with 2404 additions and 3853 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,23 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>병원 접수 키오스크</title>
<!-- Use Standard Font -->
<link rel="stylesheet" href="/css/web/font.css">
<style>
:root {
--primary-color: #1B66C9;
--primary-hover: #1652a3;
--bg-color: #F8FBFF;
--card-bg: #ffffff;
--text-main: #494E53;
--text-sub: #777d85;
--border-color: #DDE2E8;
}
* {
margin: 0;
padding: 0;
@@ -12,100 +25,63 @@
}
body {
font-family: 'Segoe UI', 'Malgun Gothic', sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
font-family: 'Pretendard', sans-serif;
background-color: var(--bg-color);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
/* 배경 애니메이션 요소 */
.bg-animation {
position: fixed;
width: 100%;
height: 100%;
overflow: hidden;
z-index: -1;
}
.floating-circle {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
animation: float 6s ease-in-out infinite;
}
.circle1 { width: 80px; height: 80px; top: 20%; left: 10%; animation-delay: 0s; }
.circle2 { width: 120px; height: 120px; top: 60%; left: 80%; animation-delay: 2s; }
.circle3 { width: 60px; height: 60px; top: 80%; left: 20%; animation-delay: 4s; }
@keyframes float {
0%, 100% { transform: translateY(0px) scale(1); opacity: 0.7; }
50% { transform: translateY(-20px) scale(1.1); opacity: 1; }
color: var(--text-main);
}
/* 메인 컨테이너 */
.kiosk-container {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 32px;
padding: 60px 80px;
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: 20px;
padding: 80px 100px;
text-align: center;
box-shadow:
0 8px 32px 0 rgba(31, 38, 135, 0.37),
inset 0 1px 0 rgba(255, 255, 255, 0.4);
width: 90vw;
max-width: 800px;
min-height: 80vh;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
width: 100%;
max-width: 1200px;
display: flex;
flex-direction: column;
justify-content: center;
animation: slideUp 0.8s ease-out;
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(50px); }
to { opacity: 1; transform: translateY(0); }
align-items: center;
min-height: 800px;
/* Force substantial height */
}
/* 헤더 */
.header {
margin-bottom: 60px;
margin-bottom: 80px;
}
.hospital-logo {
width: 80px;
height: 80px;
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
border-radius: 20px;
width: 100px;
height: 100px;
background: #fff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin: 0 auto 30px;
box-shadow: 0 10px 30px rgba(79, 172, 254, 0.3);
}
.hospital-logo::before {
content: "🏥";
font-size: 36px;
border: 2px solid #EBF3FD;
font-size: 50px;
}
.title {
color: white;
font-size: 2.8rem;
font-weight: 700;
margin-bottom: 15px;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
color: var(--text-main);
font-size: 40px;
font-weight: 800;
margin-bottom: 16px;
}
.subtitle {
color: rgba(255, 255, 255, 0.9);
font-size: 1.3rem;
color: var(--text-sub);
font-size: 18px;
font-weight: 400;
line-height: 1.6;
line-height: 1.5;
}
/* 버튼 컨테이너 */
@@ -113,296 +89,212 @@
display: flex;
gap: 40px;
justify-content: center;
flex-wrap: wrap;
margin-top: 40px;
width: 100%;
}
/* 메인 버튼 스타일 */
.patient-button {
background: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 24px;
padding: 50px 60px;
flex: 1;
max-width: 400px;
background: #fff;
border: 2px solid var(--border-color);
border-radius: 16px;
padding: 60px 40px;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
position: relative;
overflow: hidden;
min-width: 280px;
transition: all 0.2s ease-in-out;
text-decoration: none;
display: block;
}
.patient-button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.6s;
}
.patient-button:hover::before {
left: 100%;
display: flex;
flex-direction: column;
align-items: center;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.patient-button:hover {
transform: translateY(-8px) scale(1.02);
box-shadow:
0 20px 50px rgba(0, 0, 0, 0.15),
0 0 0 1px rgba(255, 255, 255, 0.4);
border-color: rgba(255, 255, 255, 0.5);
transform: translateY(-5px);
border-color: var(--primary-color);
box-shadow: 0 10px 25px rgba(27, 102, 201, 0.15);
}
.patient-button:active {
transform: translateY(-4px) scale(0.98);
}
/* 새환자 버튼 */
.new-patient {
background: linear-gradient(135deg, rgba(46, 213, 115, 0.8) 0%, rgba(0, 184, 148, 0.8) 100%);
}
.new-patient:hover {
background: linear-gradient(135deg, rgba(46, 213, 115, 0.9) 0%, rgba(0, 184, 148, 0.9) 100%);
}
/* 기존환자 버튼 */
.existing-patient {
background: linear-gradient(135deg, rgba(52, 152, 219, 0.8) 0%, rgba(155, 89, 182, 0.8) 100%);
}
.existing-patient:hover {
background: linear-gradient(135deg, rgba(52, 152, 219, 0.9) 0%, rgba(155, 89, 182, 0.9) 100%);
transform: scale(0.98);
}
/* 버튼 아이콘 */
.button-icon {
font-size: 4rem;
margin-bottom: 20px;
font-size: 60px;
margin-bottom: 30px;
display: block;
background: #EBF3FD;
width: 120px;
height: 120px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
color: var(--primary-color);
}
/* 버튼 텍스트 */
.button-text {
color: white;
font-size: 1.8rem;
color: var(--text-main);
font-size: 28px;
font-weight: 700;
margin-bottom: 10px;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
margin-bottom: 15px;
}
.button-desc {
color: rgba(255, 255, 255, 0.9);
font-size: 1.1rem;
color: var(--text-sub);
font-size: 16px;
font-weight: 400;
line-height: 1.4;
line-height: 1.5;
}
/* 하단 정보 */
.footer-info {
margin-top: 50px;
color: rgba(255, 255, 255, 0.8);
font-size: 1rem;
margin-top: 80px;
color: #999;
font-size: 15px;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 20px;
flex-direction: column;
gap: 10px;
}
.current-time {
font-weight: 600;
}
.help-text {
font-style: italic;
color: var(--primary-color);
font-size: 18px;
}
/* 반응형 디자인 */
@media (max-width: 768px) {
@media (max-width: 1024px) {
.kiosk-container {
padding: 40px 30px;
width: 95vw;
min-height: 90vh;
}
.title {
font-size: 2.2rem;
}
.subtitle {
font-size: 1.1rem;
padding: 40px;
min-height: auto;
}
.button-container {
flex-direction: column;
gap: 30px;
align-items: center;
gap: 20px;
}
.patient-button {
min-width: 100%;
max-width: 400px;
padding: 40px 30px;
width: 100%;
padding: 40px;
flex-direction: row;
text-align: left;
gap: 20px;
}
.button-icon {
font-size: 3rem;
margin-bottom: 0;
width: 80px;
height: 80px;
font-size: 40px;
}
.button-text {
font-size: 1.5rem;
}
.footer-info {
flex-direction: column;
text-align: center;
gap: 10px;
margin-bottom: 5px;
}
}
/* 접근성 향상 */
.patient-button:focus {
outline: 3px solid #FFD700;
outline-offset: 4px;
}
/* 로딩 애니메이션 */
/* 로딩 화면 */
.loading {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 1.2rem;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.8);
z-index: 1000;
}
.spinner {
border: 3px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top: 3px solid white;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin: 0 auto 15px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
align-items: center;
justify-content: center;
color: var(--primary-color);
font-weight: 600;
font-size: 18px;
}
</style>
</head>
<body>
<!-- 배경 애니메이션 -->
<div class="bg-animation">
<div class="floating-circle circle1"></div>
<div class="floating-circle circle2"></div>
<div class="floating-circle circle3"></div>
</div>
<body>
<!-- 키오스크 메인 화면 -->
<div class="kiosk-container">
<div class="header">
<div class="hospital-logo"></div>
<h1 class="title">병원 접수</h1>
<p class="subtitle">환자 유형을 선택해 주세요<br>해당하는 버튼을 터치해 주시기 바랍니다</p>
<p class="subtitle">환자 유형을 선택해 주세요</p>
</div>
<div class="button-container">
<a href="#" class="patient-button new-patient" onclick="handleSelection('new')">
<span class="button-icon">👤➕</span>
<div class="button-text">신규 환자</div>
<div class="button-desc">처음 내원하시는 분<br>신규 등록이 필요합니다</div>
<a href="javascript:void(0);" class="patient-button" onclick="handleSelection('new')">
<span class="button-icon">
<!-- SVG Icon for New Patient -->
<svg width="40" height="40" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12ZM12 14C9.33 14 4 15.34 4 18V20H20V18C20 15.34 14.67 14 12 14Z"
fill="#1B66C9" />
</svg>
</span>
<div>
<div class="button-text">신규 환자</div>
<div class="button-desc">처음 방문하셨나요?</div>
</div>
</a>
<a href="#" class="patient-button existing-patient" onclick="handleSelection('existing')">
<span class="button-icon">👤✓</span>
<div class="button-text">기존 환자</div>
<div class="button-desc">이전에 내원하신 분<br>진료카드를 준비해 주세요</div>
<a href="javascript:void(0);" class="patient-button" onclick="handleSelection('existing')">
<span class="button-icon">
<!-- SVG Icon for Existing Patient -->
<svg width="40" height="40" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M19 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM12 17L7 12L8.41 10.59L12 14.17L17.59 8.59L19 10L12 17Z"
fill="#1B66C9" />
</svg>
</span>
<div>
<div class="button-text">기존 환자</div>
<div class="button-desc">다시 방문하셨나요?</div>
</div>
</a>
</div>
<div class="footer-info">
<div class="current-time" id="currentTime"></div>
<div class="help-text">도움이 필요하시면 안내데스크 문의해 주세요</div>
<div>안내데스크 문의</div>
</div>
</div>
<!-- 로딩 화면 -->
<div class="loading" id="loadingScreen">
<div class="spinner"></div>
<div>접수 화면으로 이동 중...</div>
<div class="loading" id="loadingScreen" style="display:none; flex-direction:column;">
<div style="margin-bottom:10px;">이동 중...</div>
</div>
<script>
// 현재 시간 표시
function updateTime() {
const now = new Date();
const timeString = now.toLocaleString('ko-KR', {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
weekday: 'long'
hour: '2-digit', minute: '2-digit', weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'
});
document.getElementById('currentTime').textContent = timeString;
}
// 페이지 로드 시 시간 업데이트 및 1분마다 갱신
updateTime();
setInterval(updateTime, 60000);
// 버튼 선택 처리
function handleSelection(type) {
// 로딩 화면 표시
document.getElementById('loadingScreen').style.display = 'block';
// 실제 구현에서는 여기서 다음 화면으로 이동
const loading = document.getElementById('loadingScreen');
loading.style.display = 'flex';
setTimeout(() => {
if (type === 'new') {
alert('신규 환자 등록 화면으로 이동합니다.\n\n필요한 서류:\n- 신분증\n- 보험카드');
// alert('신규 - 신분증 지참');
window.location.href = '/kiosk/NewPatientIntro.do';
} else {
alert('기존 환자 접수 화면으로 이동합니다.\n\n필요한 준비물:\n- 진료카드 또는 주민등록번호\n- 보험카드');
// alert('기존 - 진료카드 지참');
window.location.href = '/kiosk/ExistPatientIntro.do';
}
document.getElementById('loadingScreen').style.display = 'none';
}, 1500);
}
// 키보드 접근성 지원
document.addEventListener('keydown', function(e) {
if (e.key === '1') {
handleSelection('new');
} else if (e.key === '2') {
handleSelection('existing');
}
});
// 터치 피드백 효과
document.querySelectorAll('.patient-button').forEach(button => {
button.addEventListener('touchstart', function() {
this.style.transform = 'scale(0.95)';
});
button.addEventListener('touchend', function() {
this.style.transform = '';
});
});
// 화면 절전 방지 (Wake Lock API)
if ('wakeLock' in navigator) {
navigator.wakeLock.request('screen').catch(err => {
console.log('Wake lock failed:', err);
});
loading.style.display = 'none';
}, 500);
}
</script>
</body>
</html>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff