refactoring the MPharmgx and MPharmgxUsage classes