text:
Tag: Aston Martin
Dec 1, 2020 - 05:17 pm
UK newspapers print false "study" from PR firm
A new "study" claiming that electric cars are harmful to the climate has appeared as major British media outlets took the 'fake science' up without due scrutiny.
Mercedes increases Aston Martin shares
Mercedes-Benz has announced that it will significantly increase its stake in the struggling British manufacturer Aston Martin Lagonda from what is currently 2.6 per cent to a maximum of 20 per cent. In return, the British company is to receive hybrid and electric drive trains from Mercedes.
Sep 1, 2020 - 12:47 pm
Aston Martin's fully electric car is not for adults
What to do when the little darling wants an (electric) Aston Martin? Well not much but now a bit since the British company turned to an unusual way of becoming electric – just a little.
Mar 24, 2020 - 12:49 pm
Aston Martin reveals technical details to hybrid motor systems
After Aston Martin recently postponed plans for battery-electric cars, the British sports car manufacturer has now published more details of its electrification plans. These mainly focus on hybrid engines.
Aston Martin postpones electrification plans
The financially stricken sports car manufacturer Aston Martin has begun postponing their plans for electric cars. Although the British company has a new investor, it will first invest the existing budget in combustion engine models and the new SUV DBX.
Is Aston Martin cancelling Rapide E production?
In April 2019, Aston Martin presented its first electric model, the Rapide E, which was to be built in a limited edition of 155 units. Now a British magazine reports that not even these few electric cars will see the light of day.
Detroit Electric ghosted Aston Martin
Two years ago, the US American startup announced intentions of developing three EV models but since there hasn't been any news. A new report now claims that the company is having financial trouble. Apparently DE even subcontracted Aston Martin to develop a chassis system, and then stiffed them on the bill.
Aston Martin starts production at 2nd UK plant
Aston Martin has started production at its second plant in the UK. In St. Athan, Wales, pre-series vehicles of the SUV model DBX are now rolling off the production line, soon followed by the Rapid E.
Apr 16, 2019 - 05:23 pm
Aston Martin launches limited edition Rapide E
Aston Martin CEO, Marek Reichman, took to the stage at Auto Shanghai to reveal his company's first fully electric model, the Rapid E. The zero-emission luxury car is to have a strictly limited production run of 155 units and will be delivered to customers later this year.
James Bond goes electric
Similarly to other British celebrities, James Bond will be going electric in her Majesty's service in the next film. While the movies have always been noted by car enthusiasts, the Aston Martin Rapide E, is upholding the tradition and exclusively so as only 155 units will be built.
Mar 6, 2019 - 03:18 pm
Lagonda presents "All-Terrain" e-SUV concept
Aston Martin's electric car outlet Lagonda has brought a preview of its first production model to Geneva. The "All-Terrain Concept" will be produced at the new St. Athan plant in Wales from 2022. Unfortunately, the manufacturer has not yet revealed any technical details in its otherwise imaginative description.
Sep 13, 2018 - 03:34 pm
Aston Martin reveals specifications of the Rapide E
Aston Martin has officially announced the performance specifications of their first fully-electric vehicle, the Rapide E. The BEV will be released next year in a 155 model series. First deliveries are planned for the fourth quarter of 2019.
Aston Martin makes Wales its 'Home of Electrification'
Aston Martin is working on a new plant in St. Athan in Wales. Once the Rapide E will roll off the lines here in 2019, the factory will become what Aston calls their "Home of Electrification". By 2021, it will indeed house their EV label Lagonda.
UK: £35M for three low-carbon technology projects
The British government has awarded a total of 35M pounds to three projects involving players such as Nissan and Aston Martin. They are developing low carbon technology with funding through the UK's Advanced Propulsion Centre (APC) with industry matching the investment.
Aston Martin & RR both envisioning luxurious air taxis
Aston Martin presents the Vision Volante Concept, a study of a premium VTOL with hybrid propulsion. Whether the three-seater will ever take-off on a mass scale is uncertain. Yet Aston is on to something as Rolls-Royce also issued their version of an air taxi.
May 12, 2018 - 06:06 pm
Aston Martin teases first Lagonda EV
Following the recent decision to turn Lagonda into a fully developed EV brand, Aston Martin now has officially declared their first vehicle model to be an electric luxury SUV, based on the Lagonda Vision Concept from Geneva. The first teaser was also subsequently released.
May 9, 2018 - 10:35 am
Aston Martin builds underwater hyper EV
Forget about supercars; super submarines are all the latest rage. Aston Martin has just started production of project Neptune that is more imaginative than its name suggests.
Aston Martins electric brand Lagonda to debut with SUV
Aston Martin are to turn their Lagonda label into a pure EV brand reportedly and now revealed some details regarding their first model. It will built on their Vision concept, first presented in Geneva earlier this year, and is an electric SUV set to debut in 2021.
Lagonda turns into EV brand and shows first concept
Aston Martin announced to transform Lagonda into a pure EV brand and with the electric-powered Lagonda Vision Concept the audience of the Geneva Motor Show will already get an impression of the brand's future design language.
Feb 5, 2018 - 02:09 pm
Aston Martin to invest over 650m GBP in China
Aston Martin has announced over 650 million pounds in investments to further grow in the Chinese market. In conventional ways rather than all-electric although the outreach to partners in the NEV segment is ongoing.
Jan 6, 2018 - 11:03 am
Aston Martin wants no PHEV, rather an electric sports car
PHEVs won't be part of Aston Martin's line-up. That is, what CEO Andy Palmer said "Auto Express". However, he made clear that Aston Martin will stick to its objective to electrify all of its models until 2025.
Oct 10, 2017 - 09:38 am
Aston Martin plans submarine and makes fun of Dyson.
The British manufacturer has unveiled plans for an own submarine, inspired by its hybrid hyper car Valkyrie. Besides that, Aston Martin mocks Dyson for its vision to develop a radical new EV model – by publishing a picture of its very first vacuum cleaner.
Aug 31, 2017 - 11:03 am
Cummins, Schaeffler, NCTE, Aston Martin, Tesla.
E-truck by diesel engine builder: Cummins, commonly known for its diesel motors, apparently got a sense for Zeitgeist and now presents its own electric truck. The AEOS is an 8 ton cab able to tow a 22 ton trailer. Its 140 kWh battery is said to last for 160 kilometres of heavy duty but Cummins offers an optional diesel range extender that expands the operation to 500 km. Still, Cummins seems serious and plans to begin production by 2019. Once the AEOS will hit the road a year later, the manufacturer targets a charge time of 20 minutes, Tesla style.
electrek.co, carscoops.com, forbes.com
E-bike sensors: Schaeffler has teamed up with NCTE to get a foot into the torque sensor market for electric bicycles. The cooperation shall lead to a joint portfolio that Schaeffler wants to market exclusively worldwide. The sensors measure the cadence or, the cadence frequency combined with torque.
greencarcongress.com, schaeffler.de
— Text Ad–
EVS30 in Stuttgart: New standards in electromobility From 9th to 11th October 2017 the entire electromobility industry will meet in Stuttgart for the EVS30. Find out about latest trends as well as applications of the electric drive train – at the exhibition or in the international conference. Don't miss EVS30 and also visit the co-located events BATTERY+STORAGE and f-cell.
www.evs30.org
Big in Japan: Aston Martin wants to open a new 500m pound Meta Technology site in Japan to strengthen its position in Asia. The office will be responsible for connecting with local firms specialised in electric powertrain and connected technologies, as well as growing Aston Martin's dealer network.
autocar.co.uk
Battery price changes: Tesla has decreased costs for its top trim 100 kWh battery pack for both the Model S and X. They are now up to 5,000 dollars cheaper or rather cost the same as they did before the last price increase. Tesla claims it is passing cost efficiency improvements trough to customers.
electrek.co
Jul 19, 2017 - 08:08 am
Zero emission Aston Martin.
When certain manufacturers are asked when they will offer an electric model, most take a defiant approach. Aston Martin however, decided to bridge the waiting time with humour and presents its first ultra clean and extra light ZEV, the AMR-SB racer. P.s.: SB stands for soapbox.
autoblog.com
Aston Martin, Renault, Seat, Kia, BMW, Shenzhen Wuzhoulong.
Aston Martin to limit RapidE: The British want to manufacture no more than 155 units of its all-electric RapidE from 2019. That is just one third of the amount announced initially. The reason is that Aston Martin quit its partnership (for this electric model) with Chinese company Le Eco due to the latter's financial problems. Pre-orders with a down payment of 10 percent of the total 200,000 pounds shall be possible from August. The electric version of Aston Martin's DBX is supposed to enter the market by 2019.
Pricing for Renault's electric Kangoo: In Germany, net prices for the new Kangoo Z.E. with its 33 kWh battery start at 20,820 euros, the cheapest long version Kangoo Maxi is available for 22,820. For the first time, the French offer the battery for sale rather than lease only with its EV.
electrive.net
Seat to electrify its Cupra: The Spanish intend to create electric versions of its performance models called Cupra. So far, the Seat Leon is the only one existing as well in a Cupra version, but in 2018 an Ateca Cupra is to follow. Seat's first EV model based on the MEB platform is due by 2019.
autoexpress.co.uk
No electrification of Kia's Stonic: The Korean car manufacturer denies rumours claiming an electric twin of its compact crossover Stonic at launch. Marketing head Seo Bo-won stated that there won't be a hybrid version neither. The explanation is that Kia seeks to delineate the Stonic from the Niro.
theinvestor.co.kr
BMW extends its U.S. factory: The Germans want to invest 600m dollars in Spartanburg, South Carolina and create 1,000 jobs over the next four years, BMW announced during its X3 model presentation. It seems likely, the planned X3 electric version will be made in Spartanburg from 2019, too.
motortrend.com, businessinsider.com
New electric bus for China: Shenzhen Wuzhoulong Motors has presented a 12 metre electric bus for the Chinese market. The Wuzhoulong F2 Felicity comes with a 250 kW drive from UQM and shall be particularly light and thus particularly energy-efficient.
greencarcongress.com, businesswire.com
Navya, Aston Martin, Empa, BAE Systems.
Navya plans U.S. Production: The French manufacturer wants to erect an assembly facility for autonomous EVs in Michigan. It is there the first 20 units of its electric shuttle Arma shall come off the lines this year. Navya has worked together with the University of Michigan in order to test the Arma model in its simulated city dubbed Mcity since 2016, hence its decision to produce outside Europe.
greencarcongress.com, mlive.com, navya.tech
Aston Martin's Valkyrie: The hybrid super sports car by Aston Martin and Red Bull may deliver 1,130 hp, according to unconfirmed information. 1,000 hp however come from a V12 engine, the rest is contributed electrically. As reported, the battery system will be supplied by Rimac, the drive control by Bosch. The edition is limited to 150 regular units and 25 additional racing vehicles.
carscoops.com, roadandtrack.com
Hydrogen decoded: Scientists of the Eidgenössische Materialprüfungs- und Forschungsanstalt (Empa) managed to decode the movement of H2 ions in crystals. Their results could help to choose more suitable materials for fuel cells and H2 storage in the future.
empa.ch
UK based BAE Systems teams up with QinetiQ as both seek to equip combat vehicles with electric mobility systems. The aim is to improve the vehicles' fuel efficiency and to decrease their life-cycle costs. While BAE is an expert in the field of defence tech, QinetiQ contributes its electric drive expertise.
baesystems.com
Mar 10, 2017 - 08:43 am
Magna, Techrules, Aston Martin, John Deere, BMW.
Fuel cell REx by Magna: The Canadians have an electric van concept on the stand in Switzerland that uses fuel cells to extend the range. Magna's FCREEV is based on the Mercedes Viano with a 30 kWh fuel cell stack coming from Proton Motor. The battery holds 16 kWh and serves for about 70 km of the total range of 350 km. The concept is not scheduled for production but serves Magna as mobile shop front rather. While the company said it sees "big potential" in the future, prices for both fuel cells and batteries are too high to be competitive at present.
autonews.com, magna.com (in German)
Techrules presents the production-ready Ren with turbine range extender in Geneva as promised previously. The sports car delivers up to 960 kW and has a range of 1,170 km, according to its Chinese creators. Production is to start by 2018 in a limited run of 96 track versions that can be ordered now. The Ren has a six e-motor set-up and offers three battery options (14kWh, 25kWh, and 32kWh) as well as two different turbines. The company plans to use tech components of this rather showy car that was designed in Italy in future models that could range from SUV to small city cars.
autocar.co.uk, electriccarsreport.com
Aston Martin Valkyrie is the name Aston Martin and Red Bull chose for their hybrid racer, that was known AM-RB 001 before Geneva. Audi CEO Rupert Stadler took the opportunity to open rivalries on the spot when he considered Audi's very own hypercar.
carscoops.com, autocar.co.uk (Audi)
Hybrid digger by BMW: John Deere developed an excavator with the support of BMW's subsidiary Designworks. Their concept is called Fixstern Backhoe and is currently on display at the CONEXPO-CON/AGG show in Las Vegas.
autoblog.com, bmwgroupdesignworks.com
Feb 17, 2017 - 09:46 am
LG Chem, Aston Martin, Ballard, Kyburz.
LG to break ground: Korean battery maker LG Chem plans to expand its Michigan facility this March to fulfil surging demand for EV batteries. The Holland facility produces cells and powerpacks for the Chevy Volt and Chrysler Pacifica Hybrid among others. The 9,300 square meter addition will create 150 more jobs once it goes online in August.
mlive.com, wzzm13.com
Insights from a hybrid hype: Aston Martin names suppliers for its hybrid racer AM-RB 001 it is developing together with Red Bull. From Croatian Rimac comes the battery system and Bosch is on the controls for the drive. Only 150 road-going AM-RB 001s will be made, but Aston Martin will produce an additional 25 track-only versions. First deliveries are set to start in 2019.
electrek.co, astonmartin.com
Stronger does it better: The fun EV eRod by Kyburz just got even more fun. The eRod Race ist 150 kW more powerful than all other versions. Plus, the fun lasts for 220 km delivered by a 39 kWh battery pack. Costs are 88,000 CHR as DIY version and 107,000 CHF when complete.
auto-wirtschaft.ch (in German)
Ballard becomes ever bigger in China as it just made a 5 year deal with Chinese Broad-Ocean to produce and sell 30 and 85kW fuel cell systems in three strategic regions in China, including Shanghai. The contract is estimated to be worth 25m dollars in revenue to Ballard.
greencarcongress.com
Renault-Nissan reaches new milestone.
Having sold 350,000 EVs, Renault-Nissan has reached yet another milestone. The Nissan Leaf alone sold more than 230,000 times and Renault also did its part, just recently having sold it 100,000th electric car to a man in Oslo.
greencarcongress.com, renault.com
Jul 6, 2016 - 08:56 am
Cadillac, Mahindra, Opel, Aston Martin, Red Bull, Tesla.
Cadillac launch: The new Cadillac CT6 has been launched ahead of schedule in Berlin and will be travelling to mainland Europe on September 5th. It comes at a starting price of 73,500 euros, but it remains unclear whether the car will be offered in the U.K. A plug-in hybrid version is also in the works.
autocar.com
Autonomous Mahindra? Mahindra CEO Anand Mahindra told Autocar that the company plans to produce a range of autonomous electric cars by leveraging Mahindra's many brands including Tech Mahindra. Further details remain unknown.
Opel Ampera-e sighting: Chevy Bolt-inspired Opel Ampera-e has been spotted for the first time since teaser shots were released in February. The mildly camouflaged EV was found testing in Germany.
carscoops.com
Martin-Red Bull mashup: Aston Martin and Red Bull revealed their AM-RB 001 hypercar and granted exclusive access of the full-sized model to Autocar, who snagged some footage. An F1-inspired energy recovery system is harvesting kinetic energy from braking.
autocar.co.uk, youtube.com
Tesla in Taiwan: Tesla has opened a pop-up store in the Taiwanese capital Taipei. The shop will remain in the Shin Kong Mitsukoshi Department Store until August 31st, and a full-scale store is still to come. The Model S online design studio opened in the country last weekend.
electrek.co, chinapost.com.tw
Hybridised sports car: Future iterations of the Ariel Atom could use hybrid power. CEO Simon Saunders also told Autocar that a purely electric version would make sense, suggesting "the Atom will move with the times."
https://www.electrive.com/2020/12/01/uk-newspapers-print-false-study-from-pr-firm/


text:
INSERT INTO qiita.labmanager_access (email)
    VALUES ('test@foo.bar'), ('admin@foo.bar'), ('demo@microbio.me'),
           ('LabmanSystem@labman.com');

DO $do$
DECLARE
    -- General index variables
    idx_row_well                        INT;
    idx_col_well                        INT;
    plate_idx                           INT;
    well_container_type_id              BIGINT;
    tube_container_type_id              BIGINT;

    -- Reagent creation variables
    rc_process_type_id                  BIGINT;
    rc_process_id_ek                    BIGINT;
    rc_process_id_mm                    BIGINT;
    rc_process_id_w                     BIGINT;
    reagent_comp_type                   BIGINT;

    -- Variables for primer working plates
    wpp_process_type_id                 BIGINT;
    wpp_process_id                      BIGINT;
    wpp_emp_primer_set_id               BIGINT;
    wpp_plate_id                        BIGINT;
    wpp_container_id                    BIGINT;
    wpp_composition_id                  BIGINT;
    primer_composition_type_id          BIGINT;
    microtiter_96_plate_type_id         BIGINT;
    psc_id                              BIGINT;
    shotgun_wpp_process_id              BIGINT;
    shotgun_wpp_primer_set_id           BIGINT;
    wpp_i5_plate_id                     BIGINT;
    wpp_i7_plate_id                     BIGINT;

    -- Variables for sample plating
    plating_process_id                  BIGINT;
    plating_process_type_id             BIGINT;
    deepwell_96_plate_type_id           BIGINT;
    sample_plate_id                     BIGINT;
    plating_container_id                BIGINT;
    sample_comp_type_id                 BIGINT;
    sample_type_id                      BIGINT;
    plating_composition_id              BIGINT;
    plating_sample_comp_type_id         BIGINT;
    plating_sample_id                   VARCHAR;
    plating_sample_content              VARCHAR;
    vibrio_type_id                      BIGINT;
    blank_type_id                       BIGINT;
    empty_type_id                       BIGINT;
    plating_sample_composition_id       BIGINT;

    -- Variables for extraction
    ext_robot_id                        BIGINT;
    kf_robot_id                         BIGINT;
    ext_kit_container_id                BIGINT;
    ext_kit_reagent_comp_type           BIGINT;
    ext_kit_reagent_composition_id      BIGINT;
    ext_kit_composition_id              BIGINT;
    ext_tool_id                         BIGINT;
    gdna_process_type_id                BIGINT;
    gdna_process_id                     BIGINT;
    gdna_subprocess_id                  BIGINT;
    gdna_plate_id                       BIGINT;
    gdna_container_id                   BIGINT;
    gdna_comp_id                        BIGINT;
    gdna_comp_type_id                   BIGINT;
    gdna_subcomposition_id              BIGINT;

    -- Variables for 16S library prep
    lib_prep_16s_process_type_id        BIGINT;
    lib_prep_16s_process_id             BIGINT;
    lib_prep_16s_subprocess_id          BIGINT;
    master_mix_container_id             BIGINT;
    master_mix_reagent_comp_type        BIGINT;
    master_mix_composition_id           BIGINT;
    master_mix_reagent_composition_id   BIGINT;
    water_container_id                  BIGINT;
    water_composition_id                BIGINT;
    water_reagent_comp_type             BIGINT;
    water_reagent_composition_id        BIGINT;
    tm300_8_id                          BIGINT;
    tm50_8_id                           BIGINT;
    proc_robot_id                       BIGINT;
    lib_prep_16s_plate_id               BIGINT;
    lib_prep_16s_container_id           BIGINT;
    lib_prep_16s_comp_type_id           BIGINT;
    lib_prep_16s_composition_id         BIGINT;
    primer_comp_id                      BIGINT;

    -- Variables for pico green quantification
    pg_quant_process_type_id            BIGINT;
    pg_quant_process_id                 BIGINT;
    pg_quant_subprocess_id              BIGINT;

    -- Variables for plate pooling creation
    p_pool_process_type_id              BIGINT;
    p_pool_process_id                   BIGINT;
    p_pool_subprocess_id                BIGINT;
    p_pool_container_id                 BIGINT;
    pool_comp_type_id                   BIGINT;
    p_pool_composition_id               BIGINT;
    p_pool_subcomposition_id            BIGINT;

    -- Variables for manual quantification
    ppg_quant_process_id                BIGINT;
    ppg_quant_subprocess_id             BIGINT;

    -- Variables for sequencing pooling creation
    s_pool_process_id                   BIGINT;
    s_pool_subprocess_id                BIGINT;
    s_pool_container_id                 BIGINT;
    s_pool_composition_id               BIGINT;
    s_pool_subcomposition_id            BIGINT;

    -- Variables for sequencing
    amplicon_sequencing_process_id      BIGINT;
    sequencing_process_type_id          BIGINT;
    sequencer_id                        BIGINT;
    sequencing_subprocess_id            BIGINT;

    -- Metagenomics variables
    row_pad                             INTEGER;
    col_pad                             INTEGER;
    microtiter_384_plate_type_id        BIGINT;
    mg_row_id                           BIGINT;
    mg_col_id                           BIGINT;

    -- Variables for gDNA plate compression
    compressed_gdna_comp_type_id        BIGINT;
    echo_robot_id                       BIGINT;
    gdna_comp_process_type_id           BIGINT;
    gdna_comp_process_id                BIGINT;
    gdna_comp_container_id              BIGINT;
    gdna_comp_comp_id                   BIGINT;
    gdna_comp_subcomposition_id         BIGINT;
    gdna_comp_plate_id                  BIGINT;

    -- Variables for gDNA quantification
    mg_gdna_quant_process_id            BIGINT;
    mg_gdna_quant_subprocess_id         BIGINT;
    gdna_sample_conc                    REAL;

    -- Variables for gDNA normalization
    gdna_norm_process_type_id           BIGINT;
    gdna_norm_process_id                BIGINT;
    gdna_norm_subprocess_id             BIGINT;
    gdna_norm_plate_id                  BIGINT;
    gdna_norm_container_id              BIGINT;
    gdna_norm_comp_type_id              BIGINT;
    gdna_norm_comp_id                   BIGINT;
    norm_dna_vol                        REAL;
    norm_water_vol                      REAL;
    gdna_norm_subcomp_id                BIGINT;

    -- Variables for shotgun library prep
    rc_process_id_khp                   BIGINT;
    khp_container_id                    BIGINT;
    khp_reagent_comp_type               BIGINT;
    khp_composition_id                  BIGINT;
    khp_reagent_composition_id          BIGINT;
    rc_process_id_stubs                 BIGINT;
    stubs_container_id                  BIGINT;
    stubs_reagent_comp_type             BIGINT;
    stubs_composition_id                BIGINT;
    stubs_reagent_composition_id        BIGINT;
    shotgun_lib_process_type_id         BIGINT;
    shotgun_lib_process_id              BIGINT;
    shotgun_lib_plate_id                BIGINT;
    shotgun_lib_comp_type_id            BIGINT;
    shotgun_lib_container_id            BIGINT;
    shotgun_lib_comp_id                 BIGINT;
    combo_idx                           BIGINT;
    i5_primer_id                        BIGINT;
    i7_primer_id                        BIGINT;

    -- Variables for shotgun lib concentration
    sh_lib_quant_process_id             BIGINT;
    sh_lib_quant_subprocess_id          BIGINT;
    sh_lib_raw_sample_conc              REAL;
    sh_lib_comp_sample_conc             REAL;

    -- Variables for shotgun pooling
    sh_pool_process_id                  BIGINT;
    sh_pool_subprocess_id               BIGINT;
    sh_pool_subcomposition_id           BIGINT;
    sh_pool_container_id                BIGINT;
    sh_pool_composition_id              BIGINT;

    -- Variables for shotgun sequencing
    shotgun_sequencing_process_id       BIGINT;
    shotgun_sequencing_subprocess_id    BIGINT;
BEGIN
    --------------------------------------------
    -------- CREATE PRIMER WORKING PLATES ------
    --------------------------------------------
    SELECT process_type_id INTO wpp_process_type_id
        FROM qiita.process_type
        WHERE description = 'primer working plate creation';
    -- Populate working primer plate info
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (wpp_process_type_id, '10/23/2017', 'test@foo.bar')
        RETURNING process_id INTO wpp_process_id;
    -- Populate the primer_working_plate_creation_process
    SELECT primer_set_id INTO wpp_emp_primer_set_id
        FROM qiita.primer_set
        WHERE external_id = 'EMP 16S V4 primer set';
    INSERT INTO qiita.primer_working_plate_creation_process (process_id, primer_set_id, master_set_order_number)
        VALUES (wpp_process_id, wpp_emp_primer_set_id, 'EMP PRIMERS MSON 1');

    -- Get the id of the container type "well"
    SELECT container_type_id INTO well_container_type_id
        FROM qiita.container_type
        WHERE description = 'well';

    -- Get the id of the primer composition type
    SELECT composition_type_id INTO primer_composition_type_id
        FROM qiita.composition_type
        WHERE description = 'primer';

    -- Get the id of the 96-well microtiter plate configuration
    SELECT plate_configuration_id INTO microtiter_96_plate_type_id
        FROM qiita.plate_configuration
        WHERE description = '96-well microtiter plate';

    -- Get the id of the 384-well microtiter plate configuration
    SELECT plate_configuration_id INTO microtiter_384_plate_type_id
        FROM qiita.plate_configuration
        WHERE description = '384-well microtiter plate';

    -- We need to create 8 plates, since the structure is the same for
    -- all use a for loop to avoid rewriting stuff
    FOR plate_idx IN 1..8 LOOP
        -- The working primer plates are identifier by the template plate number and the
        -- date they're created. Ther are 96-well microtiter plates
        INSERT INTO qiita.plate (external_id, plate_configuration_id, discarded)
            VALUES ('EMP 16S V4 primer plate ' || plate_idx::varchar || ' 10/23/2017', microtiter_96_plate_type_id, false)
            RETURNING plate_id INTO wpp_plate_id;

        -- There are 96 well plates - 2 -> well
        FOR idx_row_well IN 1..8 LOOP
            FOR idx_col_well IN 1..12 LOOP
                -- Creating the well information
                INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
                    VALUES (well_container_type_id, wpp_process_id, 10)
                    RETURNING container_id INTO wpp_container_id;
                INSERT INTO qiita.well (container_id, plate_id, row_num, col_num)
                    VALUES (wpp_container_id, wpp_plate_id, idx_row_well, idx_col_well);

                -- Creating the composition information
                INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
                    VALUES (primer_composition_type_id, wpp_process_id, wpp_container_id, 10)
                    RETURNING composition_id INTO wpp_composition_id;
                SELECT primer_set_composition_id INTO psc_id
                    FROM qiita.primer_set_composition psc
                        JOIN qiita.composition c USING (composition_id)
                        JOIN qiita.well w USING (container_id)
                        JOIN qiita.plate p USING (plate_id)
                    WHERE w.row_num = idx_row_well AND w.col_num = idx_col_well AND p.external_id = 'EMP 16S V4 primer plate ' || plate_idx;
                INSERT INTO qiita.primer_composition (composition_id, primer_set_composition_id)
                    VALUES (wpp_composition_id, psc_id);
            END LOOP;  -- Column loop
        END LOOP; -- Row loop
    END LOOP; -- Plate loop

    -- Populate working primer plate info
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (wpp_process_type_id, '10/23/2017', 'test@foo.bar')
        RETURNING process_id INTO shotgun_wpp_process_id;
    -- Populate the primer_working_plate_creation_process
    SELECT primer_set_id INTO shotgun_wpp_primer_set_id
        FROM qiita.primer_set
        WHERE external_id = 'iTru shotgun primer set';
    INSERT INTO qiita.primer_working_plate_creation_process (process_id, primer_set_id, master_set_order_number)
        VALUES (shotgun_wpp_process_id, shotgun_wpp_primer_set_id, 'SHOTGUN PRIMERS MSON 1');
    INSERT INTO qiita.plate (external_id, plate_configuration_id)
        VALUES ('iTru 5 Primer Plate 10/23/2017', microtiter_384_plate_type_id)
        RETURNING plate_id INTO wpp_i5_plate_id;
    INSERT INTO qiita.plate (external_id, plate_configuration_id)
        VALUES ('iTru 7 Primer Plate 10/23/2017', microtiter_384_plate_type_id)
        RETURNING plate_id INTO wpp_i7_plate_id;

    FOR idx_row_well IN 1..16 LOOP
        FOR idx_col_well IN 1..24 LOOP
            -- i5 primer
            -- Creating the well information
            INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
                VALUES (well_container_type_id, shotgun_wpp_process_id, 10)
                RETURNING container_id INTO wpp_container_id;
            INSERT INTO qiita.well (container_id, plate_id, row_num, col_num)
                VALUES (wpp_container_id, wpp_i5_plate_id, idx_row_well, idx_col_well);
            -- Creating the composition information
            INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
                VALUES (primer_composition_type_id, shotgun_wpp_process_id, wpp_container_id, 10)
                RETURNING composition_id INTO wpp_composition_id;
            INSERT INTO qiita.primer_composition (composition_id, primer_set_composition_id)
                VALUES (wpp_composition_id, (SELECT primer_set_composition_id
                                             FROM qiita.primer_set_composition psc
                                                JOIN qiita.composition c USING (composition_id)
                                                JOIN qiita.well w USING (container_id)
                                                JOIN qiita.plate p USING (plate_id)
                                             WHERE w.row_num = idx_row_well AND w.col_num = idx_col_well AND p.external_id = 'iTru 5 primer'));

            -- i5 primer
            -- Creating the well information
            INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
                VALUES (well_container_type_id, shotgun_wpp_process_id, 10)
                RETURNING container_id INTO wpp_container_id;
            INSERT INTO qiita.well (container_id, plate_id, row_num, col_num)
                VALUES (wpp_container_id, wpp_i7_plate_id, idx_row_well, idx_col_well);
            -- Creating the composition information
            INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
                VALUES (primer_composition_type_id, shotgun_wpp_process_id, wpp_container_id, 10)
                RETURNING composition_id INTO wpp_composition_id;
            INSERT INTO qiita.primer_composition (composition_id, primer_set_composition_id)
                VALUES (wpp_composition_id, (SELECT primer_set_composition_id
                                             FROM qiita.primer_set_composition psc
                                                JOIN qiita.composition c USING (composition_id)
                                                JOIN qiita.well w USING (container_id)
                                                JOIN qiita.plate p USING (plate_id)
                                             WHERE w.row_num = idx_row_well AND w.col_num = idx_col_well AND p.external_id = 'iTru 7 primer'));
        END LOOP; -- Column loop
    END LOOP; -- Row loop

    ---------------------------
    ---------------------------
    ------ ADD A 16S RUN ------
    ---------------------------
    ---------------------------

    -- Create reagents composition for all the reagents needed
    SELECT process_type_id INTO rc_process_type_id
        FROM qiita.process_type
        WHERE description = 'reagent creation';

    SELECT container_type_id INTO tube_container_type_id
        FROM qiita.container_type
        WHERE description = 'tube';

    -- Extraction Kit
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (rc_process_type_id, '10/23/2017', 'test@foo.bar')
        RETURNING process_id INTO rc_process_id_ek;

    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
        VALUES (tube_container_type_id, rc_process_id_ek, 10)
        RETURNING container_id INTO ext_kit_container_id;

    INSERT INTO qiita.tube (container_id, external_id)
        VALUES (ext_kit_container_id, '157022406');

    SELECT composition_type_id INTO reagent_comp_type
        FROM qiita.composition_type
        WHERE description = 'reagent';

    SELECT reagent_composition_type_id INTO ext_kit_reagent_comp_type
        FROM qiita.reagent_composition_type
        WHERE description = 'extraction kit';

    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
        VALUES (reagent_comp_type, rc_process_id_ek, ext_kit_container_id, 10)
        RETURNING composition_id INTO ext_kit_composition_id;

    INSERT INTO qiita.reagent_composition (composition_id, reagent_composition_type_id, external_lot_id)
        VALUES (ext_kit_composition_id, ext_kit_reagent_comp_type, '157022406')
        RETURNING reagent_composition_id INTO ext_kit_reagent_composition_id;

    -- Master mix
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (rc_process_type_id, '10/23/2017', 'test@foo.bar')
        RETURNING process_id INTO rc_process_id_mm;

    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
        VALUES (tube_container_type_id, rc_process_id_mm, 10)
        RETURNING container_id INTO master_mix_container_id;

    INSERT INTO qiita.tube (container_id, external_id)
        VALUES (master_mix_container_id, '443912');

    SELECT reagent_composition_type_id INTO master_mix_reagent_comp_type
        FROM qiita.reagent_composition_type
        WHERE description = 'master mix';

    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
        VALUES (reagent_comp_type, rc_process_id_mm, master_mix_container_id, 10)
        RETURNING composition_id INTO master_mix_composition_id;

    INSERT INTO qiita.reagent_composition (composition_id, reagent_composition_type_id, external_lot_id)
        VALUES (master_mix_composition_id, master_mix_reagent_comp_type, '443912')
        RETURNING reagent_composition_id INTO master_mix_reagent_composition_id;

    -- Water
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (rc_process_type_id, '10/23/2017', 'test@foo.bar')
        RETURNING process_id INTO rc_process_id_w;

    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
        VALUES (tube_container_type_id, rc_process_id_w, 10)
        RETURNING container_id INTO water_container_id;

    INSERT INTO qiita.tube (container_id, external_id)
        VALUES (water_container_id, 'RNBF7110');

    SELECT reagent_composition_type_id INTO water_reagent_comp_type
        FROM qiita.reagent_composition_type
        WHERE description = 'water';

    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
        VALUES (reagent_comp_type, rc_process_id_w, water_container_id, 10)
        RETURNING composition_id INTO water_composition_id;

    INSERT INTO qiita.reagent_composition (composition_id, reagent_composition_type_id, external_lot_id)
        VALUES (water_composition_id, water_reagent_comp_type, 'RNBF7110')
        RETURNING reagent_composition_id INTO water_reagent_composition_id;

    -- Kappa Hyper Plus kit
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (rc_process_type_id, '10/23/2017', 'test@foo.bar')
        RETURNING process_id INTO rc_process_id_khp;

    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
        VALUES (tube_container_type_id, rc_process_id_khp, 10)
        RETURNING container_id INTO khp_container_id;

    INSERT INTO qiita.tube (container_id, external_id)
        VALUES (khp_container_id, 'KHP1');

    SELECT reagent_composition_type_id INTO khp_reagent_comp_type
        FROM qiita.reagent_composition_type
        WHERE description = 'kappa hyper plus kit';

    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
        VALUES (reagent_comp_type, rc_process_id_khp, khp_container_id, 10)
        RETURNING composition_id INTO khp_composition_id;

    INSERT INTO qiita.reagent_composition (composition_id, reagent_composition_type_id, external_lot_id)
        VALUES (khp_composition_id, khp_reagent_comp_type, 'KHP1')
        RETURNING reagent_composition_id INTO khp_reagent_composition_id;

    -- Stubs
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (rc_process_type_id, '10/23/2017', 'test@foo.bar')
        RETURNING process_id INTO rc_process_id_stubs;

    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
        VALUES (tube_container_type_id, rc_process_id_stubs, 10)
        RETURNING container_id INTO stubs_container_id;

    INSERT INTO qiita.tube (container_id, external_id)
        VALUES (stubs_container_id, 'STUBS1');

    SELECT reagent_composition_type_id INTO stubs_reagent_comp_type
        FROM qiita.reagent_composition_type
        WHERE description = 'shotgun stubs';

    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
        VALUES (reagent_comp_type, rc_process_id_stubs, stubs_container_id, 10)
        RETURNING composition_id INTO stubs_composition_id;

    INSERT INTO qiita.reagent_composition (composition_id, reagent_composition_type_id, external_lot_id)
        VALUES (stubs_composition_id, stubs_reagent_comp_type, 'STUBS1')
        RETURNING reagent_composition_id INTO stubs_reagent_composition_id;

    -----------------------------------
    ------ SAMPLE PLATING PROCESS ------
    -----------------------------------
    SELECT process_type_id INTO plating_process_type_id
        FROM qiita.process_type
        WHERE description = 'sample plating';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (plating_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO plating_process_id;

    -------------------------------------
    ------ GDNA EXTRACTION PROCESS ------
    -------------------------------------
    SELECT process_type_id INTO gdna_process_type_id
        FROM qiita.process_type
        WHERE description = 'gDNA extraction';

    SELECT equipment_id INTO ext_robot_id
        FROM qiita.equipment
        WHERE external_id = 'LUCY';

    SELECT equipment_id INTO kf_robot_id
        FROM qiita.equipment
        WHERE external_id = 'KF1';

    SELECT equipment_id INTO ext_tool_id
        FROM qiita.equipment
        WHERE external_id = '108379Z';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (gdna_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO gdna_process_id;

    INSERT INTO qiita.gdna_extraction_process (process_id, epmotion_robot_id, epmotion_tool_id, kingfisher_robot_id, extraction_kit_id)
        VALUES (gdna_process_id, ext_robot_id, ext_tool_id, kf_robot_id, ext_kit_reagent_composition_id)
        RETURNING gdna_extraction_process_id INTO gdna_subprocess_id;

    --------------------------------------
    ------ 16S Library prep process ------
    --------------------------------------
    SELECT process_type_id INTO lib_prep_16s_process_type_id
        FROM qiita.process_type
        WHERE description = '16S library prep';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (lib_prep_16s_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO lib_prep_16s_process_id;

    SELECT equipment_id INTO tm300_8_id
        FROM qiita.equipment
        WHERE external_id = '109375A';

    SELECT equipment_id INTO tm50_8_id
        FROM qiita.equipment
        WHERE external_id = '311411B';

    SELECT equipment_id INTO proc_robot_id
        FROM qiita.equipment
        WHERE external_id = 'JER-E';

    INSERT INTO qiita.library_prep_16s_process (process_id, epmotion_robot_id, epmotion_tm300_8_tool_id, epmotion_tm50_8_tool_id, master_mix_id, water_lot_id)
        VALUES (lib_prep_16s_process_id, proc_robot_id, tm300_8_id, tm50_8_id, master_mix_reagent_composition_id, water_reagent_composition_id)
        RETURNING library_prep_16s_process_id INTO lib_prep_16s_subprocess_id;

    ------------------------------------
    ------ QUANTIFICATION PROCESS ------
    ------------------------------------

    SELECT process_type_id INTO pg_quant_process_type_id
        FROM qiita.process_type
        WHERE description = 'quantification';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (pg_quant_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO pg_quant_process_id;

    INSERT INTO qiita.quantification_process (process_id)
        VALUES (pg_quant_process_id)
        RETURNING quantification_process_id INTO pg_quant_subprocess_id;

    ------------------------------------
    ------ QUANTIFICATION PROCESS ------
    ------------------------------------
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (pg_quant_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO ppg_quant_process_id;

    INSERT INTO qiita.quantification_process (process_id)
        VALUES (ppg_quant_process_id)
        RETURNING quantification_process_id INTO ppg_quant_subprocess_id;
    -----------------------------------
    ------ PLATE POOLING PROCESS ------
    -----------------------------------
    SELECT process_type_id INTO p_pool_process_type_id
        FROM qiita.process_type
        WHERE description = 'pooling';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (p_pool_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO p_pool_process_id;

    INSERT INTO qiita.pooling_process (process_id, quantification_process_id, robot_id, destination, pooling_function_data)
        VALUES (p_pool_process_id, pg_quant_subprocess_id, proc_robot_id, 1, '{"function": "amplicon", "parameters": {"dna-amount-": 240, "min-val-": 1, "max-val-": 15, "blank-val-": 2}}'::json)
        RETURNING pooling_process_id INTO p_pool_subprocess_id;

    ----------------------------------------
    ------ SEQUENCING POOLING PROCESS ------
    ----------------------------------------
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (p_pool_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO s_pool_process_id;

    INSERT INTO qiita.pooling_process (process_id, quantification_process_id, robot_id, pooling_function_data)
        VALUES (s_pool_process_id, pg_quant_subprocess_id, proc_robot_id, '{"function": "amplicon_pool", "parameters": {}}'::json)
        RETURNING pooling_process_id INTO s_pool_subprocess_id;

    ---------------------------------
    ------ CREATING THE PLATES ------
    ---------------------------------

    -- Up to this point we have created all the processes, but we have not created
    -- the different plates that are a result of these processes. The reason that
    -- We did it this way is so we can re-use the same for loop. Otherwise
    -- the SQL gets way more complicated since we will need to query for some
    -- values rather than just directly use them in the for loops that we already have

    SELECT plate_configuration_id INTO deepwell_96_plate_type_id
        FROM qiita.plate_configuration
        WHERE description = '96-well deep-well plate';

    -- Sample Plate
    INSERT INTO qiita.plate (external_id, plate_configuration_id)
        VALUES ('Test plate 1', deepwell_96_plate_type_id)
        RETURNING plate_id INTO sample_plate_id;

    SELECT composition_type_id INTO sample_comp_type_id
        FROM qiita.composition_type
        WHERE description = 'sample';

    SELECT sample_composition_type_id INTO sample_type_id
        FROM qiita.sample_composition_type
        WHERE external_id = 'experimental sample';

    SELECT sample_composition_type_id INTO vibrio_type_id
        FROM qiita.sample_composition_type
        WHERE external_id = 'vibrio.positive.control';

    SELECT sample_composition_type_id INTO blank_type_id
        FROM qiita.sample_composition_type
        WHERE external_id = 'blank';

    SELECT sample_composition_type_id INTO empty_type_id
        FROM qiita.sample_composition_type
        WHERE external_id = 'empty';

    -- gDNA plate
    INSERT INTO qiita.plate (external_id, plate_configuration_id)
        VALUES ('Test gDNA plate 1', deepwell_96_plate_type_id)
        RETURNING plate_id INTO gdna_plate_id;

    SELECT composition_type_id INTO gdna_comp_type_id
        FROM qiita.composition_type
        WHERE description = 'gDNA';

    -- 16S library prep plate
    INSERT INTO qiita.plate (external_id, plate_configuration_id)
        VALUES ('Test 16S plate 1', deepwell_96_plate_type_id)
        RETURNING plate_id INTO lib_prep_16s_plate_id;

    SELECT composition_type_id INTO lib_prep_16s_comp_type_id
        FROM qiita.composition_type
        WHERE description = '16S library prep';

    -- Pool plate
    SELECT composition_type_id INTO pool_comp_type_id
        FROM qiita.composition_type
        WHERE description = 'pool';
    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
        VALUES (tube_container_type_id, p_pool_process_id, 96)
        RETURNING container_id INTO p_pool_container_id;
    INSERT INTO qiita.tube (container_id, external_id)
        VALUES (p_pool_container_id, 'Test Pool from Plate 1');
    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
        VALUES (pool_comp_type_id, p_pool_process_id, p_pool_container_id, 96)
        RETURNING composition_id INTO p_pool_composition_id;
    INSERT INTO qiita.pool_composition (composition_id)
        VALUES (p_pool_composition_id)
        RETURNING pool_composition_id INTO p_pool_subcomposition_id;

    -- Quantify plate pools
    INSERT INTO qiita.concentration_calculation (quantitated_composition_id, upstream_process_id, raw_concentration)
        VALUES (p_pool_composition_id, ppg_quant_subprocess_id, 1.5);

    -- Pool sequencing run
    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
        VALUES (tube_container_type_id, s_pool_process_id, 2)
        RETURNING container_id INTO s_pool_container_id;
    INSERT INTO qiita.tube (container_id, external_id)
        VALUES (s_pool_container_id, 'Test sequencing pool 1');
    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
        VALUES (pool_comp_type_id, s_pool_process_id, s_pool_container_id, 2)
        RETURNING composition_id INTO s_pool_composition_id;
    INSERT INTO qiita.pool_composition (composition_id)
        VALUES (s_pool_composition_id)
        RETURNING pool_composition_id INTO s_pool_subcomposition_id;
    INSERT INTO qiita.pool_composition_components (output_pool_composition_id, input_composition_id, input_volume, percentage_of_output)
        VALUES (s_pool_subcomposition_id, p_pool_composition_id, 2, 1);

    --------------------------------
    ------ SEQUENCING PROCESS ------
    --------------------------------
    SELECT process_type_id INTO sequencing_process_type_id
        FROM qiita.process_type
        WHERE description = 'sequencing';

    SELECT equipment_id INTO sequencer_id
        FROM qiita.equipment
        WHERE external_id = 'KL-MiSeq';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (sequencing_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO amplicon_sequencing_process_id;

    INSERT INTO qiita.sequencing_process (process_id, run_name, experiment, sequencer_id,
                                          fwd_cycles, rev_cycles, assay, principal_investigator)
        VALUES (amplicon_sequencing_process_id, 'Test Run.1', 'TestExperiment1',
                sequencer_id, 151, 151, 'Amplicon', 'test@foo.bar')
        RETURNING sequencing_process_id INTO sequencing_subprocess_id;

        INSERT INTO qiita.sequencing_process_lanes (sequencing_process_id, pool_composition_id, lane_number)
            VALUES (sequencing_subprocess_id, s_pool_subcomposition_id, 1);

    INSERT INTO qiita.sequencing_process_contacts (sequencing_process_id, contact_id)
        VALUES (sequencing_subprocess_id, 'shared@foo.bar'),
               (sequencing_subprocess_id, 'admin@foo.bar'),
               (sequencing_subprocess_id, 'demo@microbio.me');

    ------------------------------------
    ------------------------------------
    ------ ADD A METAGENOMICS RUN ------
    ------------------------------------
    ------------------------------------

    --------------------------------------------
    ------ gDNA PLATE COMPRESSION PROCESS ------
    --------------------------------------------
    SELECT equipment_id INTO echo_robot_id
        FROM qiita.equipment
        WHERE external_id = 'Echo550';

    SELECT process_type_id INTO gdna_comp_process_type_id
        FROM qiita.process_type
        WHERE description = 'compress gDNA plates';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (gdna_comp_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO gdna_comp_process_id;

    INSERT INTO qiita.compression_process (process_id, robot_id)
        VALUES (gdna_comp_process_id, echo_robot_id);

    SELECT composition_type_id INTO compressed_gdna_comp_type_id
        FROM qiita.composition_type
        WHERE description = 'compressed gDNA';

    INSERT INTO qiita.plate (external_id, plate_configuration_id)
        VALUES ('Test compressed gDNA plate 1', microtiter_384_plate_type_id)
        RETURNING plate_id INTO gdna_comp_plate_id;

    -----------------------------------------
    ------ gDNA QUANTIFICATION PROCESS ------
    -----------------------------------------
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (pg_quant_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO mg_gdna_quant_process_id;

    INSERT INTO qiita.quantification_process (process_id)
        VALUES (mg_gdna_quant_process_id)
        RETURNING quantification_process_id INTO mg_gdna_quant_subprocess_id;

    ----------------------------------------
    ------ gDNA NORMALIZATION PROCESS ------
    ----------------------------------------
    SELECT process_type_id INTO gdna_norm_process_type_id
        FROM qiita.process_type
        WHERE description = 'gDNA normalization';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (gdna_norm_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO gdna_norm_process_id;

    INSERT INTO qiita.normalization_process (process_id, quantitation_process_id, water_lot_id, normalization_function_data)
        VALUES (gdna_norm_process_id, mg_gdna_quant_subprocess_id, water_reagent_composition_id, '{"function": "default", "parameters": {"total_volume": 3500, "reformat": false, "target_dna": 5, "resolution": 2.5, "min_vol": 2.5, "max_volume": 3500}}'::json)
        RETURNING normalization_process_id INTO gdna_norm_subprocess_id;

    INSERT INTO qiita.plate (external_id, plate_configuration_id)
        VALUES ('Test normalized gDNA plate 1', microtiter_384_plate_type_id)
        RETURNING plate_id INTO gdna_norm_plate_id;

    SELECT composition_type_id INTO gdna_norm_comp_type_id
        FROM qiita.composition_type
        WHERE description = 'normalized gDNA';

    -------------------------------------
    ------ SHOTGUN LIBRARY PROCESS ------
    -------------------------------------
    SELECT process_type_id INTO shotgun_lib_process_type_id
        FROM qiita.process_type
        WHERE description = 'shotgun library prep';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (shotgun_lib_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO shotgun_lib_process_id;

    INSERT INTO qiita.library_prep_shotgun_process (process_id, kappa_hyper_plus_kit_id, stub_lot_id, normalization_process_id)
        VALUES (shotgun_lib_process_id, khp_reagent_composition_id, stubs_reagent_composition_id, gdna_norm_subprocess_id);

    INSERT INTO qiita.plate (external_id, plate_configuration_id)
        VALUES ('Test shotgun library plate 1', microtiter_384_plate_type_id)
        RETURNING plate_id INTO shotgun_lib_plate_id;

    SELECT composition_type_id INTO shotgun_lib_comp_type_id
        FROM qiita.composition_type
        WHERE description = 'shotgun library prep';

    combo_idx := 0;

    --------------------------------------------
    ------ LIBRARY QUANTIFICATION PROCESS ------
    --------------------------------------------
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (pg_quant_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO sh_lib_quant_process_id;

    INSERT INTO qiita.quantification_process (process_id)
        VALUES (sh_lib_quant_process_id)
        RETURNING quantification_process_id INTO sh_lib_quant_subprocess_id;

    -----------------------------
    ------ POOLING PROCESS ------
    -----------------------------
    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (p_pool_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO sh_pool_process_id;

    INSERT INTO qiita.pooling_process (process_id, quantification_process_id, robot_id, pooling_function_data)
        VALUES (sh_pool_process_id, sh_lib_quant_subprocess_id, proc_robot_id, '{"function": "equal", "parameters": {"volume-": 200, "lib-size-": 500}}')
        RETURNING pooling_process_id INTO sh_pool_subprocess_id;

    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
        VALUES (tube_container_type_id, sh_pool_process_id, 384)
        RETURNING container_id INTO sh_pool_container_id;
    INSERT INTO qiita.tube (container_id, external_id)
        VALUES (sh_pool_container_id, 'Test pool from Shotgun plate 1');
    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
        VALUES (pool_comp_type_id, sh_pool_process_id, sh_pool_container_id, 384)
        RETURNING composition_id INTO sh_pool_composition_id;
    INSERT INTO qiita.pool_composition (composition_id)
        VALUES (sh_pool_composition_id)
        RETURNING pool_composition_id INTO sh_pool_subcomposition_id;

    --------------------------------
    ------ SEQUENCING PROCESS ------
    --------------------------------
    SELECT equipment_id INTO sequencer_id
        FROM qiita.equipment
        WHERE external_id = 'IGM-HiSeq4000';

    INSERT INTO qiita.process (process_type_id, run_date, run_personnel_id)
        VALUES (sequencing_process_type_id, '10/25/2017', 'test@foo.bar')
        RETURNING process_id INTO shotgun_sequencing_process_id;

    INSERT INTO qiita.sequencing_process (process_id, run_name, experiment, sequencer_id,
                                          fwd_cycles, rev_cycles, assay, principal_investigator)
        VALUES (shotgun_sequencing_process_id, 'TestShotgunRun1', 'TestExperimentShotgun1',
                sequencer_id, 151, 151, 'Metagenomics','test@foo.bar')
        RETURNING sequencing_process_id INTO shotgun_sequencing_subprocess_id;

    INSERT INTO qiita.sequencing_process_lanes (sequencing_process_id, pool_composition_id, lane_number)
        VALUES (shotgun_sequencing_subprocess_id, sh_pool_subcomposition_id, 1);

    INSERT INTO qiita.sequencing_process_contacts (sequencing_process_id, contact_id)
        VALUES (shotgun_sequencing_subprocess_id, 'shared@foo.bar'),
               (shotgun_sequencing_subprocess_id, 'demo@microbio.me');

    -- Start plating samples - to make this easier, we are going to plate the
    -- same 12 samples in the first 6 rows of the plate, in the 7th row we are
    -- going to plate vibrio controls and in the 8th row we are going to leave
    -- it for blanks
    FOR idx_row_well IN 1..8 LOOP
        FOR idx_col_well IN 1..12 LOOP
            IF idx_row_well <= 6 THEN
                -- Get information for plating a sample
                plating_sample_comp_type_id := sample_type_id;
                SELECT sample_id INTO plating_sample_id
                    FROM qiita.study_sample
                    WHERE study_id = 1
                    ORDER BY sample_id
                    OFFSET (idx_col_well - 1)
                    LIMIT 1;
                plating_sample_content := plating_sample_id || '.' || sample_plate_id::text || '.' || chr(ascii('@') + idx_row_well) || idx_col_well::text;
                gdna_sample_conc := 12.068;
                norm_dna_vol := 415;
                norm_water_vol := 3085;
                sh_lib_raw_sample_conc := 12.068;
                sh_lib_comp_sample_conc := 36.569;
            ELSIF idx_row_well = 7 THEN
                -- Get information for plating vibrio
                plating_sample_comp_type_id := vibrio_type_id;
                plating_sample_id := NULL;
                plating_sample_content := 'vibrio.positive.control.' || sample_plate_id::text || '.G' || idx_col_well::text;
                gdna_sample_conc := 6.089;
                norm_dna_vol := 820;
                norm_water_vol := 2680;
                sh_lib_raw_sample_conc := 8.904;
                sh_lib_comp_sample_conc := 26.981;
            ELSIF idx_col_well = 12 THEN
                -- The last column of the last row will get an empty value
                plating_sample_comp_type_id := empty_type_id;
                plating_sample_id := NULL;
                plating_sample_content := 'empty.' || sample_plate_id::text || '.H12';
            ELSE
                -- We are in the 8th row, get information for plating blanks
                plating_sample_comp_type_id := blank_type_id;
                plating_sample_id := NULL;
                plating_sample_content := 'blank.' || sample_plate_id::text || '.H' || idx_col_well::text;
                gdna_sample_conc := 0.342;
                norm_dna_vol := 3500;
                norm_water_vol := 0;
                sh_lib_raw_sample_conc := 0.342;
                sh_lib_comp_sample_conc := 1.036;
            END IF;

            -- SAMPLE WELLS
            INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
                VALUES (well_container_type_id, plating_process_id, 10)
                RETURNING container_id INTO plating_container_id;
            INSERT INTO qiita.well (container_id, plate_id, row_num, col_num)
                VALUES (plating_container_id, sample_plate_id, idx_row_well, idx_col_well);
            INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
                VALUES (sample_comp_type_id, plating_process_id, plating_container_id, 10)
                RETURNING composition_id INTO plating_composition_id;
            INSERT INTO qiita.sample_composition (composition_id, sample_composition_type_id, sample_id, content)
                VALUES (plating_composition_id, plating_sample_comp_type_id, plating_sample_id, plating_sample_content)
                RETURNING sample_composition_id INTO plating_sample_composition_id;

            CONTINUE WHEN idx_row_well = 8 AND idx_col_well = 12;

            -- GDNA WELLS
            INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
                VALUES (well_container_type_id, gdna_process_id, 10)
                RETURNING container_id INTO gdna_container_id;
            INSERT INTO qiita.well (container_id, plate_id, row_num, col_num)
                VALUES (gdna_container_id, gdna_plate_id, idx_row_well, idx_col_well);
            INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
                VALUES (gdna_comp_type_id, gdna_process_id, gdna_container_id, 10)
                RETURNING composition_id INTO gdna_comp_id;
            INSERT INTO qiita.gdna_composition (composition_id, sample_composition_id)
                VALUES (gdna_comp_id, plating_sample_composition_id)
                RETURNING gdna_composition_id INTO gdna_subcomposition_id;

            -- 16S LIBRARY PREP WELLS
            SELECT primer_composition_id INTO primer_comp_id
                FROM qiita.primer_composition
                    JOIN qiita.composition USING (composition_id)
                    JOIN qiita.well USING (container_id)
                    JOIN qiita.plate USING (plate_id)
                WHERE row_num = idx_row_well
                    AND col_num = idx_col_well
                    AND external_id = 'EMP 16S V4 primer plate 1 10/23/2017';
            INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
                VALUES (well_container_type_id, lib_prep_16s_process_id, 10)
                RETURNING container_id INTO lib_prep_16s_container_id;
            INSERT INTO qiita.well (container_id, plate_id, row_num, col_num)
                VALUES (lib_prep_16s_container_id, lib_prep_16s_plate_id, idx_row_well, idx_col_well);
            INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
                VALUES (lib_prep_16s_comp_type_id, lib_prep_16s_process_id, lib_prep_16s_container_id, 10)
                RETURNING composition_id INTO lib_prep_16s_composition_id;
            INSERT INTO qiita.library_prep_16s_composition (composition_id, gdna_composition_id, primer_composition_id)
                VALUES (lib_prep_16s_composition_id, gdna_subcomposition_id, primer_comp_id);

            -- Quantification
            INSERT INTO qiita.concentration_calculation (quantitated_composition_id, upstream_process_id, raw_concentration, computed_concentration)
                VALUES (lib_prep_16s_composition_id, pg_quant_subprocess_id, 1.5, 1.5);

            -- Pool plate
            INSERT INTO qiita.pool_composition_components (output_pool_composition_id, input_composition_id, input_volume, percentage_of_output)
                VALUES (p_pool_subcomposition_id, lib_prep_16s_composition_id, 1, 1/96);

            -- METAGENOMICS:
            FOR row_pad IN 0..1 LOOP
                FOR col_pad IN 0..1 LOOP
                    mg_row_id := ((idx_row_well - 1) * 2 + row_pad) + 1;
                    mg_col_id := ((idx_col_well - 1) * 2 + col_pad) + 1;
                    -- Compress plate (use the same plate 4 times)
                    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
                        VALUES (well_container_type_id, gdna_comp_process_id, 10)
                        RETURNING container_id INTO gdna_comp_container_id;
                    INSERT INTO qiita.well (container_id, plate_id, row_num, col_num)
                        VALUES (gdna_comp_container_id, gdna_comp_plate_id, mg_row_id, mg_col_id);
                    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
                        VALUES (compressed_gdna_comp_type_id, gdna_comp_process_id, gdna_comp_container_id, 10)
                        RETURNING composition_id INTO gdna_comp_comp_id;
                    INSERT INTO qiita.compressed_gdna_composition (composition_id, gdna_composition_id)
                        VALUES (gdna_comp_comp_id, gdna_subcomposition_id)
                        RETURNING compressed_gdna_composition_id INTO gdna_comp_subcomposition_id;

                    -- Quantify plate
                    INSERT INTO qiita.concentration_calculation (quantitated_composition_id, upstream_process_id, raw_concentration)
                        VALUES (gdna_comp_comp_id, mg_gdna_quant_subprocess_id, gdna_sample_conc);

                    -- Normalize plate
                    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
                        VALUES (well_container_type_id, gdna_norm_process_id, 3500)
                        RETURNING container_id INTO gdna_norm_container_id;
                    INSERT INTO qiita.well (container_id, plate_id, row_num, col_num)
                        VALUES (gdna_norm_container_id, gdna_norm_plate_id, mg_row_id, mg_col_id);
                    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
                        VALUES (gdna_norm_comp_type_id, gdna_norm_process_id, gdna_norm_container_id, 3500)
                        RETURNING composition_id INTO gdna_norm_comp_id;
                    INSERT INTO qiita.normalized_gdna_composition (composition_id, compressed_gdna_composition_id, dna_volume, water_volume)
                        VALUES (gdna_norm_comp_id, gdna_comp_subcomposition_id, norm_dna_vol, norm_water_vol)
                        RETURNING normalized_gdna_composition_id INTO gdna_norm_subcomp_id;

                    -- Library plate
                    SELECT primer_composition_id INTO i5_primer_id
                        FROM qiita.shotgun_combo_primer_set c
                            JOIN qiita.primer_composition pci5 ON c.i5_primer_set_composition_id = pci5.primer_set_composition_id
                        WHERE shotgun_combo_primer_set_id = (combo_idx + 1);
                    SELECT primer_composition_id INTO i7_primer_id
                        FROM qiita.shotgun_combo_primer_set c
                            JOIN qiita.primer_composition pci7 ON c.i7_primer_set_composition_id = pci7.primer_set_composition_id
                        WHERE shotgun_combo_primer_set_id = (combo_idx + 1);
                    combo_idx := combo_idx + 1;
                    INSERT INTO qiita.container (container_type_id, latest_upstream_process_id, remaining_volume)
                        VALUES (well_container_type_id, shotgun_lib_process_id, 4000)
                        RETURNING container_id INTO shotgun_lib_container_id;
                    INSERT INTO qiita.well (container_id, plate_id, row_num, col_num)
                        VALUES (shotgun_lib_container_id, shotgun_lib_plate_id, mg_row_id, mg_col_id);
                    INSERT INTO qiita.composition (composition_type_id, upstream_process_id, container_id, total_volume)
                        VALUES (shotgun_lib_comp_type_id, shotgun_lib_process_id, shotgun_lib_container_id, 4000)
                        RETURNING composition_id INTO shotgun_lib_comp_id;
                    INSERT INTO qiita.library_prep_shotgun_composition (composition_id, normalized_gdna_composition_id, i5_primer_composition_id, i7_primer_composition_id)
                        VALUES (shotgun_lib_comp_id, gdna_norm_subcomp_id, i5_primer_id, i7_primer_id);

                    -- Quantify library plate
                    INSERT INTO qiita.concentration_calculation (quantitated_composition_id, upstream_process_id, raw_concentration, computed_concentration)
                        VALUES (shotgun_lib_comp_id, sh_lib_quant_subprocess_id, sh_lib_raw_sample_conc, sh_lib_comp_sample_conc);

                    -- Pooling
                    INSERT INTO qiita.pool_composition_components (output_pool_composition_id, input_composition_id, input_volume, percentage_of_output)
                        VALUES (sh_pool_subcomposition_id, shotgun_lib_comp_id, 1, 1/384);
                END LOOP; -- Shotgun col pad
            END LOOP; -- Shotgun row pad

        END LOOP; -- index col well
    END LOOP; -- index row well

    -- Update the combo index value
    UPDATE qiita.shotgun_primer_set SET current_combo_index = combo_idx;

END $do$

redpajama_set_name: RedPajamaGithub


At long last, the time has come! My bags are packed, the car transmission is repaired, the fiddlers have been found, the route is set, my coffee supply is stacked, and I'm on my way! Today marks the beginning of an 8 week adventure into Virginia and West Virginia. With enormous thanks to Canada Council for the Arts, I'll be taking lessons from some of my musical heroes down south, and spending some gloriously unscheduled time in the mountains, writing, listening and living. To keep some element of suspense, I wont tell you who I'm planning to study and hang around with just yet- I want you to stay tuned! I'll be posting photos, thoughts, and, if things are going well enough...maybe even a video or two of what I'm working on.
Oh okay, I'll tell you ONE teacher.
After a quick visit and snuggle with my almost-nephew in Mount Joy, PA, I'm heading to Warrenton, VA to fire up a wood stove in my very own little apartment within a house that may or may not be approximately 200 years old. There, I'll rosin up my bow, and get cracking with the most incredible, and most reclusive fiddler I know: Rhys Jones.
Okay Jimmy Stewart, you ready? Let's drive.


It's such a lovely day today here on the west coast of Canada. The sun is shining, the flowers are beginning to bloom, and the kids are just itching to play outside. (Dare I say it? Ok, here I go…) I think Spring may be here at last! It's been particularly cold and dreary here up until now, which is why I made this warm and comforting Lasagna soup the other day. Nothing chases away the chill of the cold outdoors like hot soup in your belly, although I think this is a perfect meal for hotter weather as well because you don't have to turn on your oven to enjoy the taste of lasagna. It really does taste like deliciously cheesy lasagna in a bowl. We all loved it; all of us, that is, besides Cole. He said it was okay but he doesn't like lasagna so this couldn't be good either. Back the truck up…he doesn't like lasagna?? How can he even be my child and not like lasagna? It's only probably my most favourite food in the world. What's not to love about pasta, tomato sauce, and tons of ooey gooey cheese? Apparently a lot, if you happen to be Cole. But if you're a lasagna love like I am, I'm sure you'll appreciate this soup.
Remove sausage from casings and place in a large soup pot over medium heat. Break the sausage up into small pieces and cook until browned. Place sausage into a mesh sieve over a large bowl to drain off the fat. Set aside. In the pot, cook the onions, green pepper and garlic until softened, about 5 minutes. Add back the sausage, along with oregano, basil, tomato paste, diced tomatoes and chicken stock. Bring to a boil, then reduce heat and simmer for 30 minutes. Add pasta and cook until pasta is done. Add salt and pepper to taste.
Mix ricotta, parmesan and salt and pepper. When serving, place a spoonful of cheese mixture in the bottom of each bowl. Ladle hot soup over top. Sprinkle with mozzarella cheese.
I made this on Tuesday night and LOVED it. My very picky boyfriend loved it too – thank you for giving me a great go-to meal!
That sounds wonderful – I'm totally making that soon!
Excellent! We made it this week with spicy Italian sausage and added mushrooms and fennel since they were on hand. We used farfalline (Mini-Bowties) pasta and chicken bouillon cubes for the broth.


Understanding the Uses of Retail POS Software | Condor Solutions Ltd.
Retail POS systems are normally used at checkout points where the transaction takes place. Something similar to electronic cash registers, these systems can also be used for generating receipts and vouchers. The first POS software was actually developed in the year 1973 by IBM. However, it had very limited functional capabilities when compared to the systems today. Nothing much was heard about POS systems until 1979 when new technology made it possible for you to take customer order at the table and print the details in the kitchen. This software enabled you to include labor and food costs also. However, even this software also had its own limitations and was developed on the UNIX platform.
Modern day retail POS software is quite easy to use and comes with remote support. It is rich in features and has a high operating speed. Designed for reliability, most POS software is quite affordable and can be installed quickly. Since there are a number of companies promoting point of sale software online, it is important that you choose a company that enjoys a good reputation and provides you with genuine software at affordable prices for your retail operations. The POS software you buy is largely dependent upon the industry in which you are operating. For instance, if you are in the medical industry, you may require much more than software and could include computer networks and other such equipment. Likewise, in the restaurant business, you may require POS systems with touch screens in order to reduce service time and enhance overall efficiency levels.
Retail POS systems require efficient hardware to generate receipts, vouchers, etc at the actual point of sale. Most POS systems use receipt printers, barcode scanners, credit card readers, cash drawer and card swipes along with external hardware like USB connections. There are a number of companies that offer these POS systems in the market place. A normal POS system in a retail store comes with a POS computer with a 15 inch Touch Screen Flat Panel LCD Monitor, auto open cash drawer, and scanner with display, accounting software, thermal auto receipt printer and credit card processing software.
Irrespective of what software you are using, setting it up can be quite a task, specifically if you are using older systems. So, what does this software include? Well, most software come with mix and match features so that you can begin with the basics and add on as your business continues to grow or expand over a period of time. Most firms with multiple retail locations prefer online solutions so that they do not have to deal with in store setup and still access the software from anywhere. Lastly, the best thing about retail point of sale software is that it can be used for both in store as well as online purchase transactions.


text:
Q: How to extract using beautifulsoup python I am only interested to use beautifulsoup to extract all the value of 3-hr PSI Readings from 12AM to 11.59PM. Such as the latest bold text of 82 at 5pm.
Example of website is at http://app2.nea.gov.sg/anti-pollution-radiation-protection/air-pollution/psi/psi-readings-over-the-last-24-hours. Can anyone teach me how ? Thanks in advance !

        PSI Readings over the last 24 Hours

        24-hr PSI Readings on 24 Jun 2013

        View reading for:
        <select class="default" id="ContentPlaceHolderContent_C001_DDLTime" name="ctl00$ContentPlaceHolderContent$C001$DDLTime" onchange="changetime(this);">
    <option value="0000">12AM</option>
    <option value="0100">1AM</option>
    <option value="0200">2AM</option>
    <option value="0300">3AM</option>
    <option value="0400">4AM</option>
    <option value="0500">5AM</option>
    <option value="0600">6AM</option>
    <option value="0700">7AM</option>
    <option value="0800">8AM</option>
    <option value="0900">9AM</option>
    <option value="1000">10AM</option>
    <option value="1100">11AM</option>
    <option value="1200">12PM</option>
    <option value="1300">1PM</option>
    <option value="1400">2PM</option>
    <option value="1500">3PM</option>
    <option value="1600">4PM</option>
    <option selected="selected" value="1700">5PM</option>
    </select>

    Region

    PSI

    24-hr PM2.5 Concentration (µg/m3)

    North

                61

                47

    South

                62

                46

    East

                55

                39

    West

                87

                83

    Central

                58

                40

    Overall Singapore

                55-87

                39-83

3-hr PSI Readings from 12AM to 11.59PM on
                            24 Jun 2013

    Time

    12AM

    1AM

    2AM

    3AM

    4AM

    5AM

    6AM

    7AM

    8AM

    9AM

    10AM

    11AM

    3-hr PSI

                        76

                        70

                        64

                        59

                        54

                        51

                        48

                        47

                        47

                        47

                        49

                        52

    Time

    12PM

    1PM

    2PM

    3PM

    4PM

    5PM

    6PM

    7PM

    8PM

    9PM

    10PM

    11PM

    3-hr PSI

                        54

                        59

                        65

                        72

                        79

    82

                        -

                        -

                        -

                        -

                        -

                        -

Hourly updates of 3-hr PSI readings are provided from 12am to 11:59pm. The 3hr PSI readings are calculated based on PM10 concentrations only

    Back to Top

A: Though you should have shown that you've tried to do it yourself, but here is the code:
from pprint import pprint
import urllib2
from bs4 import BeautifulSoup as soup

url = "http://app2.nea.gov.sg/anti-pollution-radiation-protection/air-pollution/psi/psi-readings-over-the-last-24-hours"
web_soup = soup(urllib2.urlopen(url))

table = web_soup.find(name="div", attrs={'class': 'c1'}).find_all(name="div")[2].find_all('table')[0]

table_rows = []
for row in table.find_all('tr'):
    table_rows.append([td.text.strip() for td in row.find_all('td')])

data = {}
for tr_index, tr in enumerate(table_rows):
    if tr_index % 2 == 0:
        for td_index, td in enumerate(tr):
            data[td] = table_rows[tr_index + 1][td_index]

pprint(data)

prints:
{'10AM': '49',
 '10PM': '-',
 '11AM': '52',
 '11PM': '-',
 '12AM': '76',
 '12PM': '54',
 '1AM': '70',
 '1PM': '59',
 '2AM': '64',
 '2PM': '65',
 '3AM': '59',
 '3PM': '72',
 '4AM': '54',
 '4PM': '79',
 '5AM': '51',
 '5PM': '82',
 '6AM': '48',
 '6PM': '79',
 '7AM': '47',
 '7PM': '-',
 '8AM': '47',
 '8PM': '-',
 '9AM': '47',
 '9PM': '-',
 'Time': '3-hr PSI'}

redpajama_set_name: RedPajamaStackExchange


text:
We have detected that you are using Internet Explorer to visit this website. Internet Explorer is now being phased out by Microsoft. As a result, NHS Digital no longer supports any version of Internet Explorer for our web-based products, as it involves considerable extra effort and expense, which cannot be justified from public funds. Some features on this site will not work. You should use a modern browser such as Edge, Chrome, Firefox, or Safari. If you have difficulty installing or accessing a different browser, contact your IT support team.
Creating a new NHS England: NHS England and NHS Digital will merge on 1 February 2023. Learn more.
Close menu Coronavirus Services Data Cyber Developer News About
Transformation Blog
How is additional information in Summary Care Records being used?
As the coronavirus hit us in March, the Government made a significant change to the sharing of patient information for those working on the frontline in the NHS. Tamara Farrar, a user researcher at NHS Digital, looked at what that extra information meant for professionals in a wide range of different health and care settings.
Tamara Farrar , Senior User Researcher, NHS Digital
The Summary Care Record (SCR) is the main way that vital facts from a patient's GP record are shared with other clinical professionals who are involved in a person's health and care. The basic SCR includes what medication people are taking, their allergies and known adverse reactions to treatments.
My day-to-day role is part of the Spine Team in the Platforms directorate of NHS Digital, and we are in the process of delivering a re-designed version of the Summary Care Record Application. This is one of the ways a user can view a SCR. Having worked in this area for 18 months, I gained insight and knowledge regarding what our users need from a healthcare record. Past research has told me that whilst knowing about a patient's medication and allergies are important, it's often not enough.
The SCR also has an option to add additional information such as the patient's long-term conditions, immunisations, and greater depth on their medical history. But this additional information had, until the coronavirus crisis, only been included for patients who had specifically opted in.
I was really conscious that people were already up against it and dealing with huge pressures.
As hospital admissions spiked in the spring, the Government changed to an 'opt-out' model under what is known as a Control of Patient Information (COPI) notice. Additional information is now present in the SCR and shared with health and care professionals by default – except for those patients who have previously told the NHS they don't want their information sharing.
This has been a temporary measure, originally scheduled to end in September but now extended until March 2021 due to the continued impact of coronavirus.
As a user researcher, I was asked to find out how the additional information in the SCR was being used and the impact this had on healthcare professionals and their patients.
The first thing I did was identify who I needed to speak to and recruit them for my interview sessions. The groups I sought were located across many different health settings – not just in general practice and hospitals, but also in mental health services, prison healthcare and social care.
As we were in the midst of the first wave, I was really conscious that these people were already up against it and dealing with huge pressures, so I had to change the approach I would usually take. Most of my recruitment was through messages on social media and shared by the medical community – I made sure that my intent was clear and that the sessions would be short, with minimal time away from caring for patients.
During this recruitment and the subsequent interviews, what impressed me the most, was how passionate our users are, and the fact that they took the time to be involved will always be a reminder of how important this work is. We research and design around user needs, collaborating to identify solutions. These are some of the things I learned and stood out for me within the following settings:
Prison healthcare
I found the research I conducted with prison healthcare workers really interesting and unlike anything I had done before.
When a prisoner arrives at the prison straight from court, the staff need to know what medication they are on and an awareness of other factors, such as mental health issues. This is even more important if it is on a Friday. Before additional information was introduced, they would have to find this information out from other services, such as the registered GP, and potentially wait days to receive it, and they must ensure the person is as safe as possible through the weekend.
It's also important for prison clinicians to know about family history and lifestyle and even something as straightforward as their vaccination record. Knowledge of vaccinations is particularly important in a young offenders' institute because if they don't have a record, they will vaccinate the young people anyway as a precaution against common diseases.
They also told me that access to SCR in prison healthcare is a useful tool in medication reviews, because some people don't visit their GP very often and remain on repeat prescriptions for long periods of time, so there is the ability to stop medications too.
Ambulance crews
I have worked closely with ambulance crews for a long time now, mainly through my day-to-day role for Summary Care Record application private beta which is a redesign of the current SCRa and aims to make it more user friendly, accessible and available across a range of devices, removing the barriers of access normally over a health network like HSCN. Using my existing relationship with them it was nice to be able to talk about a different topic.
Ambulance crews have always told me that many people don't know a lot about their own health and don't always have great recall about their medication or conditions, which is where inclusion of additional information, would help them hugely, they said. It reduced the number of times they had to convey patients to hospital, as they felt safer in their decisions to refer to other community services.
What I saw during these shifts were crews having to turn detective.
In the past, I have carried out ethnographic research with ambulance crews, which meant that I observed them on their shifts – riding in the ambulance and assessing patients in their homes, which is one of the highlights of my career. During these shifts I saw a lot of crews having to 'turn detective' and look for medication packets, discharge letters and other evidence of the patient's medical background.
Access to additional information now enables them to see this information easily and quickly. They can also find out a lot of other history (medical and social) and use this to build up a picture of the patient in front of them and have a basis for probing further with the patient if they need to.
What healthcare professionals, such as registered nurses, in care homes found particularly useful about the additional information on the SCR was the end of life care information, which is not something I had foreseen before starting my research.
They told me that when a new resident arrives, it can be a difficult conversation for the resident and their families to have, so if the care home staff can initiate that discussion with information they have learned through the SCR, it can be very helpful for everyone to know what the wishes of the resident are, and then build on that with them.
What were my research methods?
As I said earlier, I used to visit and observe users, which gave me a good idea of how busy they were in their usual settings, whether that is in a hospital ward, GP surgery or an ambulance. However, the pandemic changed that of course and interviews had to be conducted remotely.
Doing the research remotely has been strange but I think we have adapted well to the circumstances. I certainly don't think the quality of the research has suffered. Probing people and listening carefully to their answers can be done as well over a laptop with people in their own homes as meeting up with them in their workplaces.
In addition to this qualitative research, we did some quantitative research via a national survey, which I designed. The survey was sent out via social media and through clinician networks. We asked about the impact of adding additional information and how it affected people's care. We were able to use over 200 responses from this survey and we talk about the outcomes in our published article. It was also a really useful tool for further recruitment of users and it allowed me to have some foresight into their thoughts and feelings before our sessions, and I could tailor them a little bit more.
What was the impact?
It was overwhelmingly clear from the research that the inclusion of additional information would not only have a positive impact on the health and care workers who are accessing it, but on patients too. Users told me that this change enables them to make more informed decisions, which is critical to ensure that people get the best and safest care.
This piece of work really was a pleasure to conduct and it is so good to know that I have been able to use the evidence collected to enable me to advocate for our NHS workers, and that Summary Care Records are being recognised as the powerful tool that they are. Users have become quickly accustomed to the availability of more information and it is becoming embedded into working practices in a range of health and care settings - the question still facing us though - is how we move forward from March, when the current temporary arrangement comes to an end?
Tamara Farrar
Senior User Researcher, NHS Digital
By Susie Day. 24 November 2020 How the NHS App is upping its game
Susie Day, Programme Head for the NHS App, explains how new features help support patients and clinicians to meet an increasing need for remote access to services during the pandemic and how they will improve healthcare after the current crisis.
By James Reith. 19 November 2020 Demystifying the integration process for the NHS App
James Reith, Content Designer for the NHS App, explains how the NHS App integration team have improved their integration process to make it easier for partner services to innovate.
By Richard McStay. 4 November 2020 NHS login: Coping with the large-scale adoption of digital health services
Richard McStay, Lead Delivery Manager, explains how the NHS login team is making it easier for more people to register.
Last edited: 22 December 2021 12:14 pm
About NHS Digital
Change cookie settings ???text.sr-only-link???
Copyright (c) NHS Digital ???text.sr-only-link???

redpajama_set_name: RedPajamaCommonCrawl