\begin{tikzpicture}[node distance=2.5cm]
\tikzstyle{process} = [rectangle, minimum width=1.5cm, minimum height=0.8cm, text centered, draw=black]
\tikzstyle{resource} = [rectangle, minimum height=0.8cm, text centered]
\tikzstyle{arrow} = [thick,->,>=stealth]
\node (start)[process] {ward};
\node (stage1)[process, right of=start, xshift= 0.5cm]{PHU};
\node (stage2)[process, right of=stage1]{OR};
\node (stage3)[process, right of=stage2, xshift=0.5cm]{PACU};
\node (stage4)[process, right of=stage3]{ICU};
\node (nurse)[resource, below of=stage1, yshift=0.6cm, xshift= 1.25cm]{nurses (circulating/scrub/anesthetist)};
\node (surgeon)[resource, above of=stage2, yshift= -1cm, text width=5cm]{surgeons/anesthesiologist/ tools and equipment};
\node (bed)[resource, below of=stage3, yshift= 1.2cm]{recovery bed};
\node (discharge)[resource, below of=start, yshift= 1.2cm]{patient discharge};
\node (arrival)[resource, left of=start, text width=1.3cm]{patient arrival};
\draw [arrow] (arrival)--(start);
\draw [arrow] (start)--(stage1);
\draw [arrow] (start)--(discharge);
\draw [arrow] (nurse)--(stage1);
\draw [arrow] (stage1)--(stage2);
\draw [arrow] (nurse)--(stage2);
\draw [arrow] (surgeon)--(stage2);
\draw [arrow] (stage2)--(stage3);
\draw [arrow] (bed)--(stage3);
\draw [arrow, densely dashed] (stage3)--(stage4);
\draw [arrow] (nurse)-|(stage4);
\draw [arrow] (stage3) -- +(0,2.2) -| (start);
\draw [arrow, densely dashed] (stage4) -- +(0,2.2) -- +(-2.5,2.2);
\end{tikzpicture}
답변1
|-
올바른 점을 결정하기 위해 사용할 수 있습니다
노트:
- 변경된 선은 쉽게 찾을 수 있도록 색상을 추가했습니다(앞으로 주의할 점)MWE).
- Schrödinger의 고양이 의견에 따라
\tikzstyle
를\tikzset
. 보다TikZ 스타일을 정의하려면 \tikzset 또는 \tikzstyle을 사용해야 합니까? . - |- 라인 중간에서 연결
|-
및 사용에 대한 유용한 참고 자료가 될 수 있습니다-|
.
암호:
\documentclass[10pt]{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[node distance=2.5cm]
\tikzset{process/.style={rectangle, minimum width=1.5cm, minimum height=0.8cm, text centered, draw=black}}
\tikzset{resource/.style={rectangle, minimum height=0.8cm, text centered}}
\tikzset{arrow/.style={thick,->,>=stealth}}
\node (start)[process] {ward};
\node (stage1)[process, right of=start, xshift= 0.5cm]{PHU};
\node (stage2)[process, right of=stage1]{OR};
\node (stage3)[process, right of=stage2, xshift=0.5cm]{PACU};
\node (stage4)[process, right of=stage3]{ICU};
\node (nurse)[resource, below of=stage1, yshift=0.6cm, xshift= 1.25cm]{nurses (circulating/scrub/anesthetist)};
\node (surgeon)[resource, above of=stage2, yshift= -1cm, text width=5cm]{surgeons/anesthesiologist/ tools and equipment};
\node (bed)[resource, below of=stage3, yshift= 1.2cm]{recovery bed};
\node (discharge)[resource, below of=start, yshift= 1.2cm]{patient discharge};
\node (arrival)[resource, left of=start, text width=1.3cm]{patient arrival};
\draw [arrow] (arrival)--(start);
\draw [arrow] (start)--(stage1);
\draw [arrow] (start)--(discharge);
\draw [arrow, <-, red] (stage1) -- (stage1 |- nurse.north);
\draw [arrow] (stage1)--(stage2);
\draw [arrow, <-, blue] (stage2) -- (stage2 |- nurse.north);
\draw [arrow] (surgeon)--(stage2);
\draw [arrow] (stage2)--(stage3);
\draw [arrow] (bed)--(stage3);
\draw [arrow, densely dashed] (stage3)--(stage4);
\draw [arrow] (nurse)-|(stage4);
\draw [arrow] (stage3) -- +(0,2.2) -| (start);
\draw [arrow, densely dashed] (stage4) -- +(0,2.2) -- +(-2.5,2.2);
\end{tikzpicture}
\end{document}