#include "stdafx.h"
#include "includes.h"
#include "Patient.h"


CPatient::CPatient()
{
	CString a_cs;
	m_i32Type = 0;
	COleDateTime date_time;
	date_time = COleDateTime::GetCurrentTime();
	a_cs.Format(_T("%04d-%02d-%02d"), date_time.GetYear(), date_time.GetMonth(), date_time.GetDay());
	//date_time.get
	m_i32Type = 0;
	m_i32BloodType = 0;
	m_i32Sex = 0;

	wcscpy_s(m_cID, 32, _T("1234567"));
	wcscpy_s(m_cName, 9, _T("ÐÕÃû"));
	wcscpy_s(m_cBirth, 32, a_cs);
	wcscpy_s(m_cDateIn, 32, a_cs);
	wcscpy_s(m_cWeight, 8, _T("0"));
	wcscpy_s(m_cHeight, 8, _T("0"));
}

CPatient::CPatient(CPatient &pat)
{
	wcscpy_s(m_cID, 32, pat.m_cID);
	wcscpy_s(m_cName, 9, pat.m_cName);
	wcscpy_s(m_cBirth, 32, pat.m_cBirth);
	wcscpy_s(m_cDateIn, 32, pat.m_cDateIn);
	m_i32Sex = pat.m_i32Sex;
	wcscpy_s(m_cWeight, 8, pat.m_cWeight);
	wcscpy_s(m_cHeight, 8, pat.m_cHeight);
}

CPatient::~CPatient()
{
}


void CPatient::set_pat(CPatient & pat)
{
	wcscpy_s(m_cID, 32, pat.m_cID);
	wcscpy_s(m_cName, 9, pat.m_cName);
	wcscpy_s(m_cBirth,32, pat.m_cBirth);
	wcscpy_s(m_cDateIn, 32, pat.m_cDateIn);
	m_i32Sex = pat.m_i32Sex;
	wcscpy_s(m_cWeight, 8, pat.m_cWeight);
	wcscpy_s(m_cHeight, 8, pat.m_cHeight);
}

void  CPatient::get_pat(CPatient &pat)
{
	wcscpy_s(pat.m_cID, 32, m_cID);
	wcscpy_s(pat.m_cName, 9, m_cName);
	wcscpy_s(pat.m_cBirth, 32, m_cBirth);
	wcscpy_s(pat.m_cDateIn, 32, m_cDateIn);
	pat.m_i32Sex = m_i32Sex;
	wcscpy_s(pat.m_cWeight, 8, m_cWeight);
	wcscpy_s(pat.m_cHeight, 8, m_cHeight);

}