-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change medicine to use string_view Signed-off-by: Uilian Ries <[email protected]> * Add empty medicine data Signed-off-by: Uilian Ries <[email protected]> * fill medicine data and remove vector files Signed-off-by: Uilian Ries <[email protected]> * adjust medicine tests to use string view Signed-off-by: Uilian Ries <[email protected]> --------- Signed-off-by: Uilian Ries <[email protected]>
- Loading branch information
1 parent
f5469a1
commit e550bc6
Showing
9 changed files
with
188 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
#include "faker-cxx/Medicine.h" | ||
|
||
#include "data/conditon.h" | ||
#include "data/medicaltests.h" | ||
#include "data/specialty.h" | ||
#include "MedicineData.h" | ||
#include "faker-cxx/Helper.h" | ||
|
||
namespace faker | ||
{ | ||
std::string Medicine::condition() | ||
std::string_view Medicine::condition() | ||
{ | ||
return Helper::arrayElement<std::string>(medicalConditions); | ||
return Helper::arrayElement(medicine::medicalConditions); | ||
} | ||
|
||
std::string Medicine::medicalTest() | ||
std::string_view Medicine::medicalTest() | ||
{ | ||
return Helper::arrayElement<std::string>(medicalTests); | ||
return Helper::arrayElement(medicine::medicalTests); | ||
} | ||
std::string Medicine::specialty() | ||
std::string_view Medicine::specialty() | ||
{ | ||
return Helper::arrayElement<std::string>(specialties); | ||
return Helper::arrayElement(medicine::specialties); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
#include "MedicineData.h" | ||
|
||
namespace faker::medicine { | ||
const std::array<std::string_view, 59> medicalConditions = { | ||
"AIDS", | ||
"Anorexia Nervosa", | ||
"Arthritis, Juvenile Rheumatoid", | ||
"Asthma, Moderate or Severe Persistent", | ||
"Bronchiolitis", | ||
"Bulimia", | ||
"Cancer", | ||
"Cardiorespiratory Diseases", | ||
"Celiac Disease", | ||
"Cerebral Palsy", | ||
"Cleft Lip or Palate", | ||
"Crohn’s Disease", | ||
"Cystic Fibrosis", | ||
"Depression", | ||
"Developmental, Sensory, or Motor Disabilities", | ||
"Diabetes Mellitus", | ||
"Down syndrome", | ||
"Elevated Blood Lead Level", | ||
"Epilepsy", | ||
"Failure to Thrive", | ||
"Fetal Alcohol Syndrome", | ||
"Gall Bladder Disease", | ||
"Gastro Esophageal Reflux Disease", | ||
"Gastrointestinal Abnormalities", | ||
"HIV Infection", | ||
"Heart Disease", | ||
"Hepatitis", | ||
"Hypertension, Chronic/Prehypertension", | ||
"Hypertension, Pregnancy-induced", | ||
"Hyperthyroidism", | ||
"Hypoglycemia", | ||
"Hypothyroidism", | ||
"Inborn Errors of Metabolism", | ||
"Inflammatory Bowel Disease (IBD)", | ||
"Lactose Intolerance", | ||
"Large for Gestational Age", | ||
"Liver Disease", | ||
"Lupus Erythematosus", | ||
"Major Surgery, Burns, or Trauma", | ||
"Malabsorption Syndromes", | ||
"Meningitis", | ||
"Multiple Sclerosis", | ||
"Muscular Dystrophy", | ||
"Neonatal Abstinence Syndrome", | ||
"Neural Tube Defect (Spina Bifida)", | ||
"Nutrient Deficiency Diseases", | ||
"Pancreatitis", | ||
"Parasitic Infection", | ||
"Parkinson’s disease", | ||
"Pneumonia", | ||
"Prediabetes", | ||
"Renal Disease", | ||
"Sickle Cell Anemia", | ||
"Small Bowel Enterocolitis and syndrome", | ||
"Small for Gestational Age (SGA)", | ||
"Thalassemia Major", | ||
"Tuberculosis", | ||
"Ulcerative Colitis", | ||
"Ulcers, Stomach or Intestinal" | ||
}; | ||
|
||
const std::array<std::string_view, 35> medicalTests = { | ||
"HEENT examination", | ||
"abdominal palpation", | ||
"amniocentesis", | ||
"ballistocardiogram", | ||
"capsule endoscopy", | ||
"cardiac auscultation", | ||
"coloscopy", | ||
"colposcopy", | ||
"coronary catheterization", | ||
"cystoscopy", | ||
"digital rectal examination", | ||
"echocardiography", | ||
"electrocardiogram", | ||
"electroencephalogram", | ||
"electromyography", | ||
"endoscopic retrograde cholangiopancreatography", | ||
"esophageal motility study", | ||
"esophageal pH monitoring", | ||
"esophagogastroduodenoscopy", | ||
"hearing test", | ||
"hysteroscopy", | ||
"laparoscopy", | ||
"laryngoscopy", | ||
"liver biopsy", | ||
"mammography", | ||
"neurological examination", | ||
"neuropsychological tests", | ||
"polysomnography", | ||
"psychiatric assessment", | ||
"pulmonary auscultation", | ||
"pulmonary plethysmography", | ||
"skin biopsy", | ||
"thoracentesis", | ||
"urodynamic testing", | ||
"vaginal examination" | ||
}; | ||
|
||
const std::array<std::string_view, 55> specialties = { | ||
"Accident and emergency medicine", | ||
"Allergist", | ||
"Anaesthetics", | ||
"Cardiology", | ||
"Child psychiatry", | ||
"Clinical biology", | ||
"Clinical chemistry", | ||
"Clinical microbiology", | ||
"Clinical neurophysiology", | ||
"Craniofacial surgery", | ||
"Dermatology", | ||
"Endocrinology", | ||
"Family and General Medicine", | ||
"Gastroenterologic surgery", | ||
"Gastroenterology", | ||
"General Practice", | ||
"General surgery", | ||
"Geriatrics", | ||
"Hematology", | ||
"Immunology", | ||
"Infectious diseases", | ||
"Internal medicine", | ||
"Laboratory medicine", | ||
"Nephrology", | ||
"Neurology", | ||
"Neuropsychiatry", | ||
"Neurosurgery", | ||
"Nuclear medicine", | ||
"Obstetrics and gynaecology", | ||
"Occupational medicine", | ||
"Oncology", | ||
"Ophthalmology", | ||
"Oral and maxillofacial surgery", | ||
"Orthopaedics", | ||
"Otorhinolaryngology", | ||
"Paediatric surgery", | ||
"Paediatrics", | ||
"Pathology", | ||
"Pharmacology", | ||
"Physical medicine and rehabilitation", | ||
"Plastic surgery", | ||
"Podiatric surgery", | ||
"Preventive medicine", | ||
"Psychiatry", | ||
"Public health", | ||
"Radiation Oncology", | ||
"Radiology", | ||
"Respiratory medicine", | ||
"Rheumatology", | ||
"Stomatology", | ||
"Thoracic surgery", | ||
"Tropical medicine", | ||
"Urology", | ||
"Vascular surgery", | ||
"Venereology" | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
|
||
#include <array> | ||
#include <string_view> | ||
|
||
namespace faker::medicine { | ||
extern const std::array<std::string_view, 59> medicalConditions; | ||
extern const std::array<std::string_view, 35> medicalTests; | ||
extern const std::array<std::string_view, 55> specialties; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.