iotalex / CircusRxAssist

Experimental software using Ionic framework with React to create resource endpoints for users to access medication assistance resources.
1 stars 0 forks source link

Project Oriented Programming Setup #10

Open iotalex opened 4 years ago

iotalex commented 4 years ago
Customer Product
Name Product name
Email address Product Description
Retrieve () Current Price
Save () Retrieve ()
Validate() Save ()
  Validate()

Does the product need to store historical information?

How will the product change over time?

Abstraction : use only the important content Jimmy Dean Jimmy@aol.com

Metroprolol 30 580.00 139.00 Hamilton

/*Object oriented programing:

Define appropriate members: product, product price, and description.

Box 1: customer

Box 2: Retrieve, save, etc.

UI: var name = customer.Name; <--name getter and setter Customer.Retrieve();

iotalex commented 4 years ago

`namespace CircusAppViewer.BL { public class Customer

{
    public int CustomerId { get; private set; }

    public string EmailAddress { get; set; }

    public string FirstName { get; set; }

    public string FullName
    {
        get
        {
            string fullName = LastName;
            if (!string.IsNullOrWhiteSpace(FirstName))
            {
                if (!string.IsNullOrWhiteSpace(fullName))
                {
                    fullName += ", ";
                }
                fullName += FirstName;
            }
            return fullName;
        }
    }

    public static int InstanceCount { get; set; }

    private string _lastName;
    public string LastName
    {
        get
        {
            return _lastName;
        }
        set
        {
            _lastName = value;
        }
    }

}

}`

iotalex commented 4 years ago

I'll keep this here until it's added via push request to the main application.

iotalex commented 4 years ago

JSON (CSV) column mappinp

Files: Break into 3 core files by schema: plans, drugs Columns: Schema fields get translated into individual columns Arrays: Biggest challenge is with arrays. Multiple independent arrays are especially problematic, since you can't just create a new row with that value Option 1: Just leave an array as a list within a single field. (Easiest to translate from JSON, but hard for analytics) Option 2: Pivot array into separate columns. (Easiest for analytics, but there's a long tail of typos and outliers.) Option 3: Normalize it by breaking arrays into separate files with foreign keys, such as plan id and provider NPI. (Great for loading into a relational database, but requires multiple steps before use for analytics.) (Source from other GitHub repository, unknown), delete this note on later date